org.systemsbiology.data
Class SlidingWindowTimeSeriesQueue
java.lang.Object
org.systemsbiology.data.SlidingWindowTimeSeriesQueue
- public class SlidingWindowTimeSeriesQueue
- extends Object
Implements a queue of ordered pairs of floating-point
values. The first element of the ordered pair is the time,
and the second element of the ordered pair is the value
of some variable at that time. When the queue fills up,
it start overwriting itself, discarding the oldest point
first. Therefore it is a FIFO (first-in, first-out) queue.
The temporal ordering of the timestamps is not enforced.
- Author:
- Stephen Ramsey
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SlidingWindowTimeSeriesQueue
public SlidingWindowTimeSeriesQueue(int pNumTimePoints)
initialize
public void initialize(int pNumTimePoints)
getValue
public double getValue(int pIndex)
clear
public void clear()
hasNonzeroValue
public boolean hasNonzeroValue()
getTimeLastNonzeroValue
public double getTimeLastNonzeroValue()
throws IllegalStateException
- Throws:
IllegalStateException
getLastTimePoint
public double getLastTimePoint()
getNumStoredPoints
public int getNumStoredPoints()
getTimePoint
public double getTimePoint(int pIndex)
getAverageValue
public double getAverageValue()
insertPoint
public void insertPoint(double pTime,
double pValue)
getMinTime
public double getMinTime()
getTimePoints
public double[] getTimePoints()
getValues
public double[] getValues()