DATA
- the type of the data at each point in timeSINGLE_TYPE
- the type of the an element at a single point in timeRETURNTYPE
- the time series returned by the getpublic abstract class TimeSeries<DATA,SINGLE_TYPE,RETURNTYPE extends TimeSeries<DATA,SINGLE_TYPE,RETURNTYPE>> extends Object implements Iterable<IndependentPair<Long,SINGLE_TYPE>>
These values can be used by a TimeSeriesInterpolation
to get specific
moments in time
Constructor and Description |
---|
TimeSeries() |
Modifier and Type | Method and Description |
---|---|
<OUTDATA,OUTSING,OUTRET extends TimeSeries<OUTDATA,OUTSING,OUTRET>> |
convert(TimeSeriesConverter<DATA,SINGLE_TYPE,RETURNTYPE,OUTDATA,OUTSING,OUTRET> converter)
Convert a
TimeSeries |
<OUTDATA,OUTSING,OUTRET extends TimeSeries<OUTDATA,OUTSING,OUTRET>> |
convert(TimeSeriesConverter<DATA,SINGLE_TYPE,RETURNTYPE,OUTDATA,OUTSING,OUTRET> converter,
TimeSeriesProcessor<OUTDATA,OUTSING,OUTRET> tsp)
Convert a
TimeSeries |
RETURNTYPE |
copy() |
RETURNTYPE |
get(long time)
Same as calling
get(long, int, int) with spans as 0 |
abstract RETURNTYPE |
get(long time,
int nbefore,
int nafter)
returns the DATA at a specific point in time and those before and after
to the number requested.
|
abstract RETURNTYPE |
get(long time,
int nbefore,
int nafter,
RETURNTYPE output)
Same as
get(long, int, int) but instead of createing the output
DATA instance, an existing data instance is handed which is filled. |
abstract RETURNTYPE |
get(long start,
long end)
returns the RETURNTYPE between the specified time periods.
|
abstract RETURNTYPE |
get(long time,
long threshbefore,
long threshafter)
returns the RETURNTYPE at a specific point in time and those before and
after within the specified thresholds.
|
abstract DATA |
getData() |
abstract long[] |
getTimes() |
void |
internalAssign(long[] times,
DATA data) |
abstract void |
internalAssign(RETURNTYPE interpolate) |
abstract RETURNTYPE |
newInstance() |
RETURNTYPE |
process(TimeSeriesProcessor<DATA,SINGLE_TYPE,RETURNTYPE> tsp)
process using the provided processor, return
|
RETURNTYPE |
processInplace(TimeSeriesProcessor<DATA,SINGLE_TYPE,RETURNTYPE> tsp)
Process using the provided processor
|
abstract void |
set(long[] time,
DATA data)
Set the data associated with each time.
|
abstract int |
size() |
abstract String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, iterator, spliterator
public TimeSeries()
public RETURNTYPE get(long time)
get(long, int, int)
with spans as 0time
- public abstract RETURNTYPE get(long time, int nbefore, int nafter)
Data should be returned in order
time
- nbefore
- nafter
- public abstract RETURNTYPE get(long time, int nbefore, int nafter, RETURNTYPE output)
get(long, int, int)
but instead of createing the output
DATA instance, an existing data instance is handed which is filled. For
convenience this output is also returned
Data should be returned in order
time
- nbefore
- nafter
- output
- public abstract RETURNTYPE get(long time, long threshbefore, long threshafter)
Data should be returned in order
time
- threshbefore
- threshafter
- public abstract RETURNTYPE get(long start, long end)
Data should be returned in order
start
- end
- public abstract void set(long[] time, DATA data) throws TimeSeriesSetException
time
- instances of timedata
- instances of dataTimeSeriesSetException
public abstract long[] getTimes()
public abstract RETURNTYPE newInstance()
public abstract int size()
public abstract void internalAssign(RETURNTYPE interpolate)
interpolate
- assign this timeseries to the internal one, efforts should be
made to copy the data, not simply assign itpublic void internalAssign(long[] times, DATA data)
times
- data
- public RETURNTYPE copy()
public RETURNTYPE process(TimeSeriesProcessor<DATA,SINGLE_TYPE,RETURNTYPE> tsp)
tsp
- public RETURNTYPE processInplace(TimeSeriesProcessor<DATA,SINGLE_TYPE,RETURNTYPE> tsp)
tsp
- public <OUTDATA,OUTSING,OUTRET extends TimeSeries<OUTDATA,OUTSING,OUTRET>> OUTRET convert(TimeSeriesConverter<DATA,SINGLE_TYPE,RETURNTYPE,OUTDATA,OUTSING,OUTRET> converter)
TimeSeries
OUTDATA
- OUTSING
- OUTRET
- converter
- the converterpublic <OUTDATA,OUTSING,OUTRET extends TimeSeries<OUTDATA,OUTSING,OUTRET>> OUTRET convert(TimeSeriesConverter<DATA,SINGLE_TYPE,RETURNTYPE,OUTDATA,OUTSING,OUTRET> converter, TimeSeriesProcessor<OUTDATA,OUTSING,OUTRET> tsp)
TimeSeries
OUTDATA
- OUTSING
- OUTRET
- converter
- the convertertsp
- the processor