T - the timestamp typepublic class GenericTimeTimeSeries<T extends java.lang.Comparable<? super T>> extends java.lang.Object implements MultiVariateTimeSeries<T,MultiVariateTimeSeries.Entry<T>>
MultiVariateTimeSeries.Entry<T>| Constructor and Description |
|---|
GenericTimeTimeSeries(T[] timestamps,
double[][] values)
Construct a multivariate time series from timestamps and vectors.
|
GenericTimeTimeSeries(T[] timestamps,
Matrix values)
Construct a multivariate time series from timestamps and vectors.
|
GenericTimeTimeSeries(T[] timestamps,
Vector[] values)
Construct a multivariate time series from timestamps and vectors.
|
| Modifier and Type | Method and Description |
|---|---|
GenericTimeTimeSeries<T> |
diff(int d)
Construct an instance of
GenericTimeTimeSeries by taking the first difference d times. |
int |
dimension()
Get the dimension of the multivariate time series.
|
GenericTimeTimeSeries<T> |
drop(int nItems)
Construct an instance of
GenericTimeTimeSeries by dropping the leading nItems entries,
those most backward in time entries. |
boolean |
equals(java.lang.Object obj) |
Vector |
get(int i)
Get the i-th value.
|
int |
hashCode() |
java.util.Iterator<MultiVariateTimeSeries.Entry<T>> |
iterator() |
int |
size()
Get the length of the time series.
|
T |
time(int i)
Get the i-th timestamp.
|
T[] |
timestamps()
Get all the timestamps.
|
Vector[] |
toArray()
Convert this multivariate time series into an array of vectors.
|
Matrix |
toMatrix()
Convert this multivariate time series into an m x n matrix, where
m is the dimension, and n the length.
|
java.lang.String |
toString() |
public GenericTimeTimeSeries(T[] timestamps, Vector[] values)
timestamps - the timestampsvalues - the vector valuespublic GenericTimeTimeSeries(T[] timestamps, double[][] values)
timestamps - the timestampsvalues - the vector valuespublic int dimension()
MultiVariateTimeSeriesdimension in interface MultiVariateTimeSeries<T extends java.lang.Comparable<? super T>,MultiVariateTimeSeries.Entry<T extends java.lang.Comparable<? super T>>>public int size()
TimeSeriessize in interface TimeSeries<T extends java.lang.Comparable<? super T>,Vector,MultiVariateTimeSeries.Entry<T extends java.lang.Comparable<? super T>>>public java.util.Iterator<MultiVariateTimeSeries.Entry<T>> iterator()
iterator in interface java.lang.Iterable<MultiVariateTimeSeries.Entry<T extends java.lang.Comparable<? super T>>>public Matrix toMatrix()
MultiVariateTimeSeriestoMatrix in interface MultiVariateTimeSeries<T extends java.lang.Comparable<? super T>,MultiVariateTimeSeries.Entry<T extends java.lang.Comparable<? super T>>>public Vector[] toArray()
public Vector get(int i)
i - the position indexpublic T time(int i)
i - the position indexpublic T[] timestamps()
public GenericTimeTimeSeries<T> drop(int nItems)
GenericTimeTimeSeries by dropping the leading nItems entries,
those most backward in time entries.nItems - the number of leading entries to be droppedGenericTimeTimeSeriespublic GenericTimeTimeSeries<T> diff(int d)
GenericTimeTimeSeries by taking the first difference d times.d - the number of differencesdiff(x, lag = 1, differences = d) as in Rpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object