History
, java.io.Serializable
HistoryStatistics
public class HistoryScrolling extends java.lang.Object implements History, java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected int |
cursor |
|
protected boolean |
full |
|
protected double[] |
history |
|
protected double[] |
tempX |
|
protected double[] |
tempY |
|
protected double[] |
xValues |
Constructor | Description |
---|---|
HistoryScrolling() |
|
HistoryScrolling(int n) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addValue(double x,
double y) |
Adds the given x, y pair to the History.
|
double[] |
getHistory() |
Returns an array with the most recent history at the end.
|
int |
getHistoryLength() |
Returns the number of data points tracked by the History.
|
int |
getSampleCount() |
Returns the number of data samples currently held by the History.
|
double[] |
getXValues() |
Returns an array containing the x values that have been added to the
History.
|
void |
reset() |
Removes entire history, setting all values to NaN.
|
void |
setHistoryLength(int n) |
Sets the number of values kept in the history.
|
boolean |
willDiscardNextData() |
protected double[] history
protected int cursor
protected double[] tempY
protected double[] tempX
protected double[] xValues
protected boolean full
public HistoryScrolling()
public HistoryScrolling(int n)
public void setHistoryLength(int n)
setHistoryLength
in interface History
public int getHistoryLength()
History
getHistoryLength
in interface History
public int getSampleCount()
History
getSampleCount
in interface History
public void reset()
public double[] getXValues()
History
getXValues
in interface History
public boolean addValue(double x, double y)
History
public double[] getHistory()
getHistory
in interface History
public boolean willDiscardNextData()