public class ListErrorDataSet extends AbstractErrorDataSet<ListErrorDataSet> implements DataSetError
DataSet and DataSetError
interface. User provides X and Y coordinates or only Y coordinates. In the
former case X coordinates have value of data point index. Symmetric errors in
X and Y are implemented
N.B. this is a classic list-based implementation. This is a "simple"
implementation but has a poorer performance compared to Default- and
Double-based DataSets @see DoubleDataSetfor the reference implementation,
for an implementation without asymmetric error handling,
DataSet,
DataSetErrorDataSetError.ErrorType| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<DoublePointError> |
data
Deprecated.
|
protected Map<Integer,String> |
dataLabels
Deprecated.
|
protected Map<Integer,String> |
dataStyles
Deprecated.
|
editConstraints, errorList, infoList, lock, metaInfoMap, name, updateListeners, warningList, xRange, yRangeTAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
ListErrorDataSet(String name)
Deprecated.
Creates a new instance of
DefaultDataSet. |
ListErrorDataSet(String name,
double[] yValues)
Deprecated.
Creates a new instance of
DefaultDataSet. |
ListErrorDataSet(String name,
double[] xValues,
double[] yValues)
Deprecated.
Creates a new instance of
DefaultDataSet. |
ListErrorDataSet(String name,
double[] xValues,
double[] yValues,
double[] yErrors)
Deprecated.
Creates a new instance of
DefaultDataSet. |
ListErrorDataSet(String name,
double[] xValues,
double[] yValues,
double[] xErrors,
double[] yErrors)
Deprecated.
Creates a new instance of
DefaultDataSet. |
| Modifier and Type | Method and Description |
|---|---|
ListErrorDataSet |
add(double[] xValues,
double[] yValues)
Deprecated.
Adds data points to this data set.
|
ListErrorDataSet |
add(double[] xValues,
double[] yValues,
double[] xErrors,
double[] yErrors)
Deprecated.
Adds data points to this data set.
|
ListErrorDataSet |
add(double x,
double y)
Deprecated.
|
ListErrorDataSet |
add(double x,
double y,
double ex,
double ey)
Deprecated.
add new point
|
String |
addDataLabel(int index,
String label)
Deprecated.
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)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
ListErrorDataSet |
clearData()
Deprecated.
clears all data points
|
List<DoublePointError> |
getData()
Deprecated.
|
int |
getDataCount()
Deprecated.
Get the number of data points in the data set
|
String |
getDataLabel(int index)
Deprecated.
Returns label of a data point specified by the index.
|
String |
getStyle(int index)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
double |
getX(int i)
Deprecated.
Gets the x value of the data point with the index i
|
double |
getXErrorNegative(int index)
Deprecated.
Returns the negative error along the X axis of a point specified by the
index. |
double |
getXErrorPositive(int index)
Deprecated.
Returns the positive error along the X axis of a point specified by the
index. |
double |
getY(int i)
Deprecated.
Gets the y value of the data point with the index i
|
double |
getYErrorNegative(int index)
Deprecated.
Returns the negative error along the Y axis of a point specified by the
index. |
double |
getYErrorPositive(int index)
Deprecated.
Returns the positive error along the Y axis of a point specified by the
index. |
ListErrorDataSet |
remove(int[] indices)
Deprecated.
Removes from this data set points with specified indices.
|
ListErrorDataSet |
remove(int fromIndex,
int toIndex)
Deprecated.
remove sub-range of data points
|
String |
removeDataLabel(int index)
Deprecated.
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)
Deprecated.
A string representation of the CSS style associated with this specific
DataSet data point. |
ListErrorDataSet |
set(double[] xValues,
double[] yValues)
Deprecated.
Initialises the data set with specified data.
|
ListErrorDataSet |
set(double[] xValues,
double[] yValues,
double[] xErrors,
double[] yErrors,
int count)
Deprecated.
Initialises the data set with specified data.
|
ListErrorDataSet |
set(double[] xValues,
double[] yValues,
double[] yErrors,
int count)
Deprecated.
Initialises the data set with specified data.
|
ListErrorDataSet |
set(double[] xValues,
double[] yValues,
int count)
Deprecated.
Initialises the data set with specified data.
|
ListErrorDataSet |
set(int index,
double x,
double y)
Deprecated.
Sets the point with index to the new coordinate
|
ListErrorDataSet |
set(int index,
double x,
double y,
double dx,
double dy)
Deprecated.
Sets the point with index to the new coordinate
|
computeLimits, fireInvalidated, getErrorType, getThis, lock, setErrorType, unlockbinarySearchX, binarySearchY, clearMetaInfo, getDataCount, getDataLabelMap, getDataStyleMap, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getName, getUndefValue, getWarningList, getXIndex, getXMax, getXMin, getXRange, getYIndex, getYMax, getYMin, getYRange, isAutoNotification, minNeigbourSearchX, setAutoNotifaction, setEditConstraints, setName, toString, updateEventListenergetStyle, setStyleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetErrorType, getXErrorNegative, getXErrorPositive, getXErrorsNegative, getXErrorsPositive, getYErrorNegative, getYErrorPositive, getYErrorsNegative, getYErrorsPositivegetDataCount, getName, getStyle, getUndefValue, getValue, getXIndex, getXMax, getXMin, getXValues, getYIndex, getYMax, getYMin, getYValues, isAutoNotification, lock, setAutoNotifaction, setStyle, unlockaddListener, invokeListener, invokeListener, removeListener, updateEventListenerprotected ArrayList<DoublePointError> data
public ListErrorDataSet(String name)
DefaultDataSet.name - name of this DataSet.IllegalArgumentException - if name is
nullpublic ListErrorDataSet(String name, double[] yValues)
DefaultDataSet. X coordinates are
equal to data points indices. name - name of this data set.yValues - Y coordinatesIllegalArgumentException - if any of parameters is
nullpublic ListErrorDataSet(String name, double[] xValues, double[] yValues)
Creates a new instance of DefaultDataSet.
name - name of this data set.xValues - X coordinatesyValues - Y coordinatesIllegalArgumentException - if any of parameters is
null or if arrays with coordinates have
different lengthspublic ListErrorDataSet(String name, double[] xValues, double[] yValues, double[] xErrors, double[] yErrors)
Creates a new instance of DefaultDataSet.
name - name of this data set.xValues - X coordinatesyValues - Y coordinatesxErrors - symmetric X coordinate errorsyErrors - symmetric Y coordinate errors N.B. all errors are assumed
to be positiveIllegalArgumentException - if any of parameters is
null or if arrays with coordinates have
different lengthspublic ListErrorDataSet(String name, double[] xValues, double[] yValues, double[] yErrors)
Creates a new instance of DefaultDataSet.
name - name of this data set.xValues - X coordinatesyValues - Y coordinatesyErrors - symmetric Y coordinate errors N.B. all errors are assumed
to be positiveIllegalArgumentException - if any of parameters is
null or if arrays with coordinates have
different lengthspublic List<DoublePointError> getData()
public int getDataCount()
DataSetgetDataCount in interface DataSetpublic double getX(int i)
DataSetpublic double getY(int i)
DataSetpublic double getXErrorNegative(int index)
DataSetErrorindex. Please note that errors are assumed to be always
positive!getXErrorNegative in interface DataSetErrorindex - of negative X error to be returned.DataSetError.getXErrorNegative(int)public double getXErrorPositive(int index)
DataSetErrorindex. Please note that errors are assumed to be always
positive!getXErrorPositive in interface DataSetErrorindex - of positive X error to be returned.DataSetError.getXErrorPositive(int)public double getYErrorNegative(int index)
DataSetErrorindex. Please note that errors are assumed to be always
positive!getYErrorNegative in interface DataSetErrorindex - of negative Y error to be returned.DataSetError.getYErrorNegative(int)public double getYErrorPositive(int index)
DataSetErrorindex. Please note that errors are assumed to be always
positive!getYErrorPositive in interface DataSetErrorindex - of positive Y error to be returned.DataSetError.getYErrorPositive(int)public ListErrorDataSet 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 ListErrorDataSet clearData()
public ListErrorDataSet 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 ListErrorDataSet 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 ListErrorDataSet 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 ListErrorDataSet 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 ListErrorDataSet 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 ListErrorDataSet add(double x, double y)
x - coordinatey - coordinatepublic ListErrorDataSet add(double x, double y, double ex, double ey)
x - horizontal point coordinatey - vertical point coordinateex - horizontal point errorey - vertical point error Note: point errors are expected to be
positivepublic ListErrorDataSet 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 ListErrorDataSet add(double[] xValues, double[] yValues, double[] xErrors, double[] yErrors)
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 errorspublic ListErrorDataSet remove(int fromIndex, int toIndex)
fromIndex - start indextoIndex - stop indexpublic ListErrorDataSet remove(int[] indices)
indices - array of indicices to be removedpublic String addDataLabel(int index, String label)
addDataLabel in class AbstractDataSet<ListErrorDataSet>index - of the data pointlabel - for the data point specified by the indexnull if no label has
been specifiedpublic String removeDataLabel(int index)
removeDataLabel in class AbstractDataSet<ListErrorDataSet>index - of the data pointnull if no label has
been specifiedpublic String getDataLabel(int index)
getDataLabel in interface DataSetgetDataLabel in class AbstractDataSet<ListErrorDataSet>index - of the data labelnull if
no label has been specifiedpublic String addDataStyle(int index, String style)
DataSet data point. @see #getStyle()addDataStyle in class AbstractDataSet<ListErrorDataSet>index - the index of the specific data pointstyle - of the given data point (CSS-styling)public String removeStyle(int index)
DataSet data point. @see #getStyle()removeStyle in class AbstractDataSet<ListErrorDataSet>index - the index of the specific data pointpublic String getStyle(int index)
DataSet data point. @see #getStyle()getStyle in interface DataSetgetStyle in class AbstractDataSet<ListErrorDataSet>index - the index of the specific data pointCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.