public class DoubleErrorDataSet extends AbstractErrorDataSet<DoubleErrorDataSet> implements DataSetError
DataSetError interface which stores x,y, +eyn, -eyn values
in separate double arrays. It provides methods allowing easily manipulate of
data points. for an equivalent implementation without errorsDataSetError.ErrorType| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,String> |
dataLabels |
protected int |
dataMaxIndex |
protected Map<Integer,String> |
dataStyles |
protected double[] |
xValues |
protected double[] |
yErrorsNeg |
protected double[] |
yErrorsPos |
protected double[] |
yValues |
lock, name, updateListeners, xRange, yRangeTAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
DoubleErrorDataSet(String name)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
double[] yValues)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
double[] xValues,
double[] yValues)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
double[] xValues,
double[] yValues,
double[] yErrorsNeg,
double[] yErrorsPos,
int nData)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
double[] xValues,
double[] yValues,
int nData)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
double[] yValues,
int nData)
Creates a new instance of
DoubleErrorDataSet. |
DoubleErrorDataSet(String name,
int initalSize)
Creates a new instance of
DoubleErrorDataSet. |
| Modifier and Type | Method and Description |
|---|---|
DoubleErrorDataSet |
add(double[] xValues,
double[] yValues,
double[] yErrorsNeg,
double[] yErrorsPos)
Initialises the data set with specified data.
|
DoubleErrorDataSet |
add(double x,
double y,
double yErrorNeg,
double yErrorPos)
Add point to the DoublePoints object
|
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. |
DoubleErrorDataSet |
clearData()
clears all data
|
int |
getDataCount()
Get the number of data points in the data set
|
String |
getDataLabel(int index)
Returns label of a data point specified by the index.
|
Map<Integer,String> |
getDataLabelMap() |
Map<Integer,String> |
getDataStyleMap() |
String |
getStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
double |
getX(int index)
Gets the x value of the data point with the index i
|
double |
getXErrorNegative(int index)
Returns the negative error along the X axis of a point specified by the
index. |
double |
getXErrorPositive(int index)
Returns the positive error along the X axis of a point specified by the
index. |
double[] |
getXValues() |
double |
getY(int index)
Gets the y value of the data point with the index i
|
double |
getYErrorNegative(int index)
Returns the negative error along the Y axis of a point specified by the
index. |
double |
getYErrorPositive(int index)
Returns the positive error along the Y axis of a point specified by the
index. |
double[] |
getYErrorsNegative()
Returns the negative error along the Y axis for all available data points.
|
double[] |
getYErrorsPositive()
Returns the positive error along the y axis for all available data points.
|
double[] |
getYValues() |
DoubleErrorDataSet |
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. |
DoubleErrorDataSet |
set(DataSet other)
replace/overwrite data points with those from another data set
|
DoubleErrorDataSet |
set(DataSet other,
boolean copy)
replace/overwrite data points with those from another data set
|
DoubleErrorDataSet |
set(double[] xValues,
double[] yValues,
double[] yErrorsNeg,
double[] yErrorsPos)
Initialises the data set with specified data.
|
DoubleErrorDataSet |
set(double[] xValues,
double[] yValues,
double[] yErrorsNeg,
double[] yErrorsPos,
boolean copy)
Initialises the data set with specified data.
|
DoubleErrorDataSet |
set(int index,
double x,
double y,
double yErrorNeg,
double yErrorPos)
replaces point coordinate of existing data point
|
computeLimits, getErrorType, getThis, setErrorTypebinarySearchX, binarySearchY, fireInvalidated, getDataCount, getErrorList, getInfoList, getMetaInfo, getName, getUndefValue, getWarningList, getXIndex, getXMax, getXMin, getXRange, getYIndex, getYMax, getYMin, getYRange, isAutoNotification, lock, minNeigbourSearchX, setAutoNotifaction, setName, toString, unlock, updateEventListenergetStyle, setStyleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetErrorType, getXErrorNegative, getXErrorPositive, getXErrorsNegative, getXErrorsPositive, getYErrorNegative, getYErrorPositivegetDataCount, getName, getStyle, getUndefValue, getValue, getXIndex, getXMax, getXMin, getYIndex, getYMax, getYMin, isAutoNotification, lock, setAutoNotifaction, setStyle, unlockaddListener, invokeListener, invokeListener, removeListener, updateEventListenerprotected double[] xValues
protected double[] yValues
protected double[] yErrorsPos
protected double[] yErrorsNeg
protected int dataMaxIndex
public DoubleErrorDataSet(String name)
DoubleErrorDataSet.name - name of this DataSet.IllegalArgumentException - if name is nullpublic DoubleErrorDataSet(String name, int initalSize)
DoubleErrorDataSet.name - name of this DataSet.initalSize - maximum capacity of bufferIllegalArgumentException - if name is nullpublic DoubleErrorDataSet(String name, double[] yValues, int nData)
DoubleErrorDataSet. X coordinates are equal to data points indices. name - name of this data set.yValues - Y coordinatesnData - how many data points are relevant to be takenIllegalArgumentException - if any of parameters is nullpublic DoubleErrorDataSet(String name, double[] yValues)
DoubleErrorDataSet. X coordinates are equal to data points indices. name - name of this data set.yValues - Y coordinatesIllegalArgumentException - if any of parameters is nullpublic DoubleErrorDataSet(String name, double[] xValues, double[] yValues, int nData)
DoubleErrorDataSet. X coordinates are equal to data points indices. name - name of this data set.xValues - x coordinatesyValues - Y coordinatesnData - how many data points are relevant to be takenIllegalArgumentException - if any of parameters is nullpublic DoubleErrorDataSet(String name, double[] xValues, double[] yValues)
DoubleErrorDataSet. X coordinates are equal to data points indices. name - name of this data set.xValues - x coordinatesyValues - Y coordinatesIllegalArgumentException - if any of parameters is nullpublic DoubleErrorDataSet(String name, double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, int nData)
Creates a new instance of DoubleErrorDataSet.
name - name of this data set.xValues - X coordinatesyValues - Y coordinatesyErrorsNeg - Y negative coordinate erroryErrorsPos - Y positive coordinate errornData - how many data points are relevant to be takenIllegalArgumentException - if any of parameters is null or if arrays with coordinates have
different lengthspublic Map<Integer,String> getDataLabelMap()
public double[] getXValues()
getXValues in interface DataSetpublic double[] getYValues()
getYValues in interface DataSetpublic double[] getYErrorsPositive()
DataSetErrorgetYErrorsPositive in interface DataSetErrorpublic double[] getYErrorsNegative()
DataSetErrorgetYErrorsNegative in interface DataSetErrorpublic int getDataCount()
DataSetgetDataCount in interface DataSetpublic DoubleErrorDataSet clearData()
public double getX(int index)
DataSetpublic double getY(int index)
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.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.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.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.public DoubleErrorDataSet set(int index, double x, double y, double yErrorNeg, double yErrorPos)
index - the index of the data pointx - new horizontal coordinatey - new vertical coordinateyErrorNeg - new vertical negative error of y (can be asymmetric)yErrorPos - new vertical positive error of y (can be asymmetric)public DoubleErrorDataSet add(double x, double y, double yErrorNeg, double yErrorPos)
x - the new x coordinatey - the new y coordinateyErrorNeg - the +dy erroryErrorPos - the -dy errorpublic DoubleErrorDataSet remove(int fromIndex, int toIndex)
fromIndex - start indextoIndex - stop indexpublic DoubleErrorDataSet add(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatesyErrorsNeg - the +dy errorsyErrorsPos - the -dy errorspublic DoubleErrorDataSet set(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, boolean copy)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatesyErrorsNeg - the +dy errorsyErrorsPos - the -dy errorscopy - true: makes an internal copy, false: use the pointer as is (saves memory allocation)public DoubleErrorDataSet set(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)
Initialises the data set with specified data.
Note: The method copies values from specified double arrays.xValues - X coordinatesyValues - Y coordinatesyErrorsNeg - the +dy errorsyErrorsPos - the -dy errorspublic DoubleErrorDataSet set(DataSet other)
other - the other data setpublic DoubleErrorDataSet set(DataSet other, boolean copy)
other - the other data setcopy - true: makes an internal copy, false: use the pointer as is (saves memory allocation)public String addDataLabel(int index, String label)
index - of the data pointlabel - for the data point specified by the indexnull if no label has
been specifiedpublic String removeDataLabel(int index)
index - of the data pointnull if no label has
been specifiedpublic String getDataLabel(int index)
getDataLabel in interface DataSetgetDataLabel in class AbstractDataSet<DoubleErrorDataSet>index - of the data labelnull if no label has been specifiedpublic String addDataStyle(int index, String style)
DataSet data point. @see #getStyle()index - the index of the specific data pointstyle - of data point (CSS-styling)public String removeStyle(int index)
DataSet data point. @see #getStyle()index - the index of the specific data pointpublic String getStyle(int index)
DataSet data point. @see
#getStyle()Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.