|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.stats.timeseries.multivariate.GenericTimeTimeSeries<T>
T - the Comparable typepublic class GenericTimeTimeSeries<T extends java.lang.Comparable<T>>
This is an implementation of a multivariate time series indexed by some notion of time.
This implementation explicitly remembers all data in memory. It is appropriate for short time series.
GenericTimeTimeSeries is immutable.
| Nested Class Summary | |
|---|---|
class |
GenericTimeTimeSeries.Iterator
the Iterator used to read a GenericTimeTimeSeries |
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.stats.timeseries.multivariate.MultiVariateTimeSeries |
|---|
MultiVariateTimeSeries.Entry<T> |
| Constructor Summary | |
|---|---|
GenericTimeTimeSeries(T[] timestamps,
double[][] values)
|
|
GenericTimeTimeSeries(T[] timestamps,
Matrix values)
|
|
GenericTimeTimeSeries(T[] timestamps,
Vector[] values)
Construct a GenericTimeTimeSeries from an array of timestamps and an array of vectors. |
|
| Method Summary | |
|---|---|
GenericTimeTimeSeries<T> |
diff(int d)
Create a new and independent GenericTimeTimeSeries by taking the first difference. |
int |
dimension()
Get the dimension of the multivariate time series. |
GenericTimeTimeSeries<T> |
drop(int nItems)
Create a new and independent GenericTimeTimeSeries by dropping the leading nItems entries,
the most backward in time entries. |
boolean |
equals(java.lang.Object obj)
|
Vector |
get(int index)
Get the value at position index. |
int |
hashCode()
|
GenericTimeTimeSeries.Iterator |
iterator()
Get an Iterator to read this multivariate time series. |
int |
size()
the length of the time series |
T |
time(int index)
Get the time at position index. |
T[] |
timestamps()
Get all the timestamps. |
Vector[] |
toArray()
|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GenericTimeTimeSeries(T[] timestamps,
Vector[] values)
The two arrays must be of the same length.
timestamps - an array of timestampsvalues - an array of vectors
public GenericTimeTimeSeries(T[] timestamps,
double[][] values)
public GenericTimeTimeSeries(T[] timestamps,
Matrix values)
| Method Detail |
|---|
public int dimension()
dimension in interface MultiVariateTimeSeries<T extends java.lang.Comparable<T>>public int size()
TimeSeries
size in interface TimeSeries<T extends java.lang.Comparable<T>,Vector>public GenericTimeTimeSeries.Iterator iterator()
MultiVariateTimeSeries
iterator in interface MultiVariateTimeSeries<T extends java.lang.Comparable<T>>iterator in interface TimeSeries<T extends java.lang.Comparable<T>,Vector>public Vector[] toArray()
public Matrix toMatrix()
MultiVariateTimeSeries
toMatrix in interface MultiVariateTimeSeries<T extends java.lang.Comparable<T>>public Vector get(int index)
index.
index - the position index
index-th valuepublic T time(int index)
index.
index - the position index
index-th timestamppublic T[] timestamps()
public GenericTimeTimeSeries<T> drop(int nItems)
nItems entries,
the most backward in time entries.
nItems - the number of leading entries to be dropped
public GenericTimeTimeSeries<T> diff(int d)
d - the number of differences
public 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
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||