public class SimpleTimeSeries extends Object implements IntTimeTimeSeries
double[] to form a time series.IntTimeTimeSeries.Entry| Constructor and Description |
|---|
SimpleTimeSeries(double[] values)
Constructs an instance of
SimpleTimeSeries. |
| Modifier and Type | Method and Description |
|---|---|
SimpleTimeSeries |
diff(int d)
Constructs an instance of
SimpleTimeSeries by taking the first difference d
times. |
SimpleTimeSeries |
drop(int nItems)
Constructs an instance of
SimpleTimeSeries by dropping the leading nItems
entries. |
boolean |
equals(Object obj) |
double |
get(int t)
Get the value at time
t. |
int |
hashCode() |
Iterator<IntTimeTimeSeries.Entry> |
iterator() |
SimpleTimeSeries |
lag(int nLags)
Constructs an instance of
SimpleTimeSeries by lagging the time series. |
SimpleTimeSeries |
lag(int nLags,
int length)
Constructs an instance of
SimpleTimeSeries by lagging the time series. |
int |
size()
Get the length of the time series.
|
double[] |
toArray()
Convert this time series into an array, discarding the timestamps.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic SimpleTimeSeries(double[] values)
SimpleTimeSeries.values - an array of valuespublic int size()
TimeSeriessize in interface TimeSeries<Integer,Double,IntTimeTimeSeries.Entry>public Iterator<IntTimeTimeSeries.Entry> iterator()
iterator in interface Iterable<IntTimeTimeSeries.Entry>public double[] toArray()
UnivariateTimeSeriestoArray in interface UnivariateTimeSeries<Integer,IntTimeTimeSeries.Entry>public double get(int t)
IntTimeTimeSeriest.get in interface IntTimeTimeSeriest - a time index, counting from 1tpublic SimpleTimeSeries drop(int nItems)
SimpleTimeSeries by dropping the leading nItems
entries.nItems - the number of leading entries to be droppedSimpleTimeSeriespublic SimpleTimeSeries diff(int d)
SimpleTimeSeries by taking the first difference d
times.d - the number of differencesdiff(x, lag = 1, differences = d) as in DoubleUtilspublic SimpleTimeSeries lag(int nLags, int length)
SimpleTimeSeries by lagging the time series.
This operation makes sense only for equi-distant data points.nLags - the number of lagslength - the length of the lagged time seriespublic SimpleTimeSeries lag(int nLags)
SimpleTimeSeries by lagging the time series.
This operation makes sense only for equi-distant data points.nLags - the number of lagsCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.