|
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.univariate.realtime.SimpleTimeSeries
public class SimpleTimeSeries
A simple time series has its values indexed by integers. Data are assumed to be equally spaced.
This time of series is often seen in classical time series analysis.
| Nested Class Summary | |
|---|---|
class |
SimpleTimeSeries.Iterator
the Iterator to read a SimpleTimeSeries |
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.stats.timeseries.univariate.realtime.TimeSeries |
|---|
TimeSeries.Entry |
| Constructor Summary | |
|---|---|
SimpleTimeSeries(double[] values)
Construct a SimpleTimeSeries from an array of values. |
|
| Method Summary | |
|---|---|
SimpleTimeSeries |
diff(int d)
Construct a new and independent SimpleTimeSeries by taking the first difference. |
SimpleTimeSeries |
drop(int nItems)
Construct a new and independent SimpleTimeSeries by dropping the leading nItems entries. |
boolean |
equals(java.lang.Object obj)
|
double |
get(int t)
Get the value at time t. |
int |
hashCode()
|
SimpleTimeSeries.Iterator |
iterator()
Get an Iterator to read this integer-indexed univariate time series. |
SimpleTimeSeries |
lag(int nLags)
Construct a new and independent SimpleTimeSeries by lagging the time series. |
SimpleTimeSeries |
lag(int nLags,
int length)
Construct a new and independent SimpleTimeSeries by lagging the time series. |
int |
size()
the length of the time series |
double[] |
toArray()
Convert this time series into an array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleTimeSeries(double[] values)
values - an array of values| Method Detail |
|---|
public SimpleTimeSeries.Iterator iterator()
TimeSeries
iterator in interface TimeSeries<java.lang.Integer,java.lang.Double>public int size()
TimeSeries
size in interface TimeSeries<java.lang.Integer,java.lang.Double>public double[] toArray()
TimeSeries
public double get(int t)
TimeSeriest.
t - the time index, ranging from 1 up to T
ts[t]public SimpleTimeSeries drop(int nItems)
nItems entries.
nItems - the number of leading entries to be dropped
public SimpleTimeSeries diff(int d)
d - the number of differences
public SimpleTimeSeries lag(int nLags,
int length)
This only makes sense for equi-distant data points.
nLags - the number of lagslength - the length of the lagged time series
public SimpleTimeSeries lag(int nLags)
This only makes sense for equi-distant data points.
nLags - the number of lags
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 | |||||||