public class LimitedIndexedTreeDataSet extends AbstractErrorDataSet<LimitedIndexedTreeDataSet> implements DataSet2D
DataSet,
DataSetError,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
LimitedIndexedTreeDataSet.DataAtom |
DataSetError.ErrorType| Modifier and Type | Field and Description |
|---|---|
protected IndexedNavigableSet<LimitedIndexedTreeDataSet.DataAtom> |
data |
protected double |
maxLength |
protected int |
maxQueueSize |
protected boolean |
subtractOffset |
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
LimitedIndexedTreeDataSet(String name,
int maxQueueSize)
Creates a new instance of
DefaultDataSet. |
LimitedIndexedTreeDataSet(String name,
int maxQueueSize,
double maxLength)
Creates a new instance of
DefaultDataSet. |
| Modifier and Type | Method and Description |
|---|---|
LimitedIndexedTreeDataSet |
add(double[] xValues,
double[] yValues)
Adds data points to this data set.
|
LimitedIndexedTreeDataSet |
add(double[] xValues,
double[] yValues,
double[] xErrors,
double[] yErrors,
String... labelStyle)
Adds data points to this data set.
|
LimitedIndexedTreeDataSet |
add(double x,
double y) |
LimitedIndexedTreeDataSet |
add(double x,
double y,
double ex,
double ey,
String... labelStyle)
add new point
|
String |
addDataLabel(int index,
String label)
adds a custom new data label for a point The label can be used as a category name if CategoryStepsDefinition is
used or for annotations displayed for data points.
|
String |
addDataStyle(int index,
String style)
A string representation of the CSS style associated with this specific
DataSet data point. |
LimitedIndexedTreeDataSet |
clearData()
remove all data points
|
void |
expire()
checks X data range and removes old data points if they exceed the maximum data range
|
void |
expire(double now)
checks X data range and removes old data points if they exceed the maximum data range
|
double |
get(int dimIndex,
int i)
Gets the x value of the data point with the index i
|
IndexedNavigableSet<LimitedIndexedTreeDataSet.DataAtom> |
getData() |
int |
getDataCount(int dimIndex)
Get the number of data points in the data set for a specific dimension.
|
String |
getDataLabel(int index)
Returns label of a data point specified by the index.
|
double |
getErrorNegative(int dimIndex,
int index)
Returns the negative error along the 'dimIndex' axis of a point specified by the
index. |
double |
getErrorPositive(int dimIndex,
int index)
Returns the positive error along the 'dimIndex' axis of a point specified by the
index. |
double |
getMaxLength() |
int |
getMaxQueueSize() |
String |
getStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
boolean |
isSubtractOffset() |
LimitedIndexedTreeDataSet |
remove(int[] indices)
Removes from this data set points with specified indices.
|
LimitedIndexedTreeDataSet |
remove(int fromIndex,
int toIndex)
remove sub-range of data points
|
String |
removeDataLabel(int index)
remove a custom data label for a point The label can be used as a category name if CategoryStepsDefinition is
used or for annotations displayed for data points.
|
String |
removeStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
LimitedIndexedTreeDataSet |
reset()
removes all data points
|
LimitedIndexedTreeDataSet |
set(double[] xValues,
double[] yValues)
Initialises the data set with specified data.
|
LimitedIndexedTreeDataSet |
set(double[] xValues,
double[] yValues,
double[] xErrors,
double[] yErrors,
int count)
Initialises the data set with specified data.
|
LimitedIndexedTreeDataSet |
set(double[] xValues,
double[] yValues,
double[] yErrors,
int count)
Initialises the data set with specified data.
|
LimitedIndexedTreeDataSet |
set(double[] xValues,
double[] yValues,
int count)
Initialises the data set with specified data.
|
LimitedIndexedTreeDataSet |
set(int index,
double x,
double y)
Sets the point with index to the new coordinate
|
LimitedIndexedTreeDataSet |
set(int index,
double x,
double y,
double dx,
double dy)
Sets the point with index to the new coordinate
|
LimitedIndexedTreeDataSet |
setMaxLength(double maxLength) |
LimitedIndexedTreeDataSet |
setMaxQueueSize(int maxQueueSize) |
void |
setSubtractOffset(boolean subtractOffset) |
fireInvalidated, getErrorType, getThis, lock, recomputeLimits, setErrorTypeautoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, getAxisDescriptions, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getWarningList, hashCode, minNeigbourSearchX, setEditConstraints, setName, toString, updateEventListenergetStyle, setStyleclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDimension, getValue, getValue, getX, getXIndex, getXValues, getY, getYIndex, getYValuesgetAxisDescription, getAxisDescriptions, getDataCount, getIndex, getName, getStyle, getValues, lock, recomputeLimits, setStyleaddListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListenergetErrorNegative, getErrorPositive, getErrorsNegative, getErrorsPositiveprotected IndexedNavigableSet<LimitedIndexedTreeDataSet.DataAtom> data
protected int maxQueueSize
protected double maxLength
protected boolean subtractOffset
public LimitedIndexedTreeDataSet(String name, int maxQueueSize)
DefaultDataSet.name - name of this DataSet.maxQueueSize - maximum number of samples that is being storedIllegalArgumentException - if name is nullpublic LimitedIndexedTreeDataSet(String name, int maxQueueSize, double maxLength)
DefaultDataSet.name - name of this DataSet.maxQueueSize - maximum number of samples that is being storedmaxLength - maximum length between first and last sampleIllegalArgumentException - if name is nullpublic LimitedIndexedTreeDataSet add(double x, double y)
x - coordinatey - coordinatepublic LimitedIndexedTreeDataSet add(double x, double y, double ex, double ey, String... labelStyle)
x - horizontal point coordinatey - vertical point coordinateex - horizontal point errorey - vertical point error Note: point errors are expected to be positivelabelStyle - optional varadic argument containing the data label (first index) and data style (second index)public LimitedIndexedTreeDataSet add(double[] xValues, double[] yValues)
usingXValues flag is set to false - array with X coordinates is not taken into account (may be
null) otherwise both arrays must be non-null and have the same length.xValues - X coordinatesyValues - Y coordinatespublic LimitedIndexedTreeDataSet add(double[] xValues, double[] yValues, double[] xErrors, double[] yErrors, String... labelStyle)
usingXValues flag is set to false - array with X coordinates is not taken into account (may be
null) otherwise both arrays must be non-null and have the same length.xValues - X coordinatesyValues - Y coordinatesxErrors - horizontal errorsyErrors - vertical errorslabelStyle - optional varadic argument containing the data label (first index) and data style (second index)public String addDataLabel(int index, String label)
addDataLabel in class AbstractDataSet<LimitedIndexedTreeDataSet>index - of the data pointlabel - for the data point specified by the indexnull if no label has been specifiedpublic String addDataStyle(int index, String style)
DataSet data point. @see
#getStyle()addDataStyle in class AbstractDataSet<LimitedIndexedTreeDataSet>index - the index of the specific data pointstyle - data point CSS-stylenull if no label has been specifiedpublic LimitedIndexedTreeDataSet clearData()
public void expire()
setMaxLength(double)public void expire(double now)
now - actual time stamp to be taken as a 't0' referencesetMaxLength(double)public double get(int dimIndex,
int i)
DataSetpublic IndexedNavigableSet<LimitedIndexedTreeDataSet.DataAtom> getData()
public int getDataCount(int dimIndex)
DataSetgetDataCount in interface DataSetdimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')public String getDataLabel(int index)
getDataLabel in interface DataSetgetDataLabel in class AbstractDataSet<LimitedIndexedTreeDataSet>index - of the data labelnull if no label has been specifiedpublic double getErrorNegative(int dimIndex,
int index)
DataSetErrorindex. Please note
that errors are assumed to be always positive!getErrorNegative in interface DataSetErrordimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')index - of negative 'dimIndex' error to be returned.public double getErrorPositive(int dimIndex,
int index)
DataSetErrorindex. Please note
that errors are assumed to be always positive!getErrorPositive in interface DataSetErrordimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')index - of positive 'dimIndex' error to be returned.public double getMaxLength()
public int getMaxQueueSize()
public String getStyle(int index)
DataSet data point. @see
#getStyle()getStyle in interface DataSetgetStyle in class AbstractDataSet<LimitedIndexedTreeDataSet>index - the index of the specific data pointpublic boolean isSubtractOffset()
true: normalise x-Axis to last valuepublic LimitedIndexedTreeDataSet remove(int fromIndex, int toIndex)
fromIndex - starting indextoIndex - stopping indexpublic LimitedIndexedTreeDataSet remove(int[] indices)
indices - array of indicices to be removedpublic String removeDataLabel(int index)
removeDataLabel in class AbstractDataSet<LimitedIndexedTreeDataSet>index - of the data pointnull if no label has been specifiedpublic String removeStyle(int index)
DataSet data point. @see
#getStyle()removeStyle in class AbstractDataSet<LimitedIndexedTreeDataSet>index - the index of the specific data pointnull if no label has been specifiedpublic LimitedIndexedTreeDataSet reset()
public LimitedIndexedTreeDataSet set(double[] xValues, double[] yValues)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatespublic LimitedIndexedTreeDataSet set(double[] xValues, double[] yValues, double[] xErrors, double[] yErrors, int count)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatesxErrors - symmetric X coordinate errorsyErrors - symmetric Y coordinate errorscount - number of points to be taken from specified arrays.public LimitedIndexedTreeDataSet set(double[] xValues, double[] yValues, double[] yErrors, int count)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatesyErrors - symmetric Y coordinate errorscount - number of points to be taken from specified arrays.public LimitedIndexedTreeDataSet set(double[] xValues, double[] yValues, int count)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatescount - number of points to be taken from specified arrays.public LimitedIndexedTreeDataSet set(int index, double x, double y)
index - the point index of the data setx - the horizontal coordinate of the data pointy - the vertical coordinate of the data pointpublic LimitedIndexedTreeDataSet set(int index, double x, double y, double dx, double dy)
index - the point index of the data setx - the horizontal coordinate of the data pointy - the vertical coordinate of the data pointdx - the horizontal errordy - the vertical error N.B. assumes symmetric errorspublic LimitedIndexedTreeDataSet setMaxLength(double maxLength)
maxLength - maximum X range before points are getting droppedpublic LimitedIndexedTreeDataSet setMaxQueueSize(int maxQueueSize)
maxQueueSize - maximum number of data points before points are getting droppedpublic void setSubtractOffset(boolean subtractOffset)
subtractOffset - true: normalise x-Axis to last valueCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.