Package de.gsi.dataset.samples.legacy
Class DoubleErrorDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<D>
-
- de.gsi.dataset.spi.AbstractErrorDataSet<DoubleErrorDataSet>
-
- de.gsi.dataset.samples.legacy.DoubleErrorDataSet
-
- All Implemented Interfaces:
de.gsi.dataset.DataSet,de.gsi.dataset.DataSetError,de.gsi.dataset.DataSetMetaData,de.gsi.dataset.EditableDataSet,de.gsi.dataset.event.EventSource
public class DoubleErrorDataSet extends de.gsi.dataset.spi.AbstractErrorDataSet<DoubleErrorDataSet> implements de.gsi.dataset.DataSetError, de.gsi.dataset.EditableDataSet
Deprecated.this is kept for reference/performance comparisons onlyImplementation of theDataSetErrorinterface which stores x,y, +eyn, -eyn values in separate double arrays. It provides methods allowing easily manipulate of data points.
User provides X and Y coordinates or only Y coordinates. In the former case X coordinates have value of data point index. This version being optimised for native double arrays.- Author:
- rstein
- See Also:
for an equivalent implementation without errors
-
-
Field Summary
Fields Modifier and Type Field Description protected intdataMaxIndexDeprecated.protected double[]xValuesDeprecated.protected double[]yErrorsNegDeprecated.protected double[]yErrorsPosDeprecated.protected double[]yValuesDeprecated.
-
Constructor Summary
Constructors Constructor Description DoubleErrorDataSet(de.gsi.dataset.DataSet another)Deprecated.Creates a new instance ofDoubleDataSetas copy of another (deep-copy).DoubleErrorDataSet(java.lang.String name)Deprecated.Creates a new instance ofDoubleErrorDataSet.DoubleErrorDataSet(java.lang.String name, double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, int nData, boolean deepCopy)Deprecated.Creates a new instance ofDoubleErrorDataSet.DoubleErrorDataSet(java.lang.String name, int initalSize)Deprecated.Creates a new instance ofDoubleErrorDataSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DoubleErrorDataSetadd(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)Deprecated.Initialises the data set with specified data.DoubleErrorDataSetadd(double x, double y)Deprecated.Add point to the DoublePoints object.DoubleErrorDataSetadd(double x, double y, double yErrorNeg, double yErrorPos)Deprecated.Add point to the DoublePoints objectde.gsi.dataset.EditableDataSetadd(int index, double x, double y)Deprecated.DoubleErrorDataSetclearData()Deprecated.clears all dataintgetDataCount()Deprecated.doublegetX(int index)Deprecated.doublegetXErrorNegative(int index)Deprecated.doublegetXErrorPositive(int index)Deprecated.double[]getXValues()Deprecated.doublegetY(int index)Deprecated.doublegetYErrorNegative(int index)Deprecated.doublegetYErrorPositive(int index)Deprecated.double[]getYErrorsNegative()Deprecated.double[]getYErrorsPositive()Deprecated.double[]getYValues()Deprecated.de.gsi.dataset.EditableDataSetremove(int index)Deprecated.DoubleErrorDataSetremove(int fromIndex, int toIndex)Deprecated.remove sub-range of data pointsDoubleErrorDataSetset(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)Deprecated.Initialises the data set with specified data.DoubleErrorDataSetset(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, boolean copy)Deprecated.Initialises the data set with specified data.DoubleErrorDataSetset(int index, double x, double y)Deprecated.replaces point coordinate of existing data pointDoubleErrorDataSetset(int index, double x, double y, double yErrorNeg, double yErrorPos)Deprecated.replaces point coordinate of existing data pointDoubleErrorDataSetset(de.gsi.dataset.DataSet other)Deprecated.clear old data and overwrite with data from 'other' data set (deep copy)-
Methods inherited from class de.gsi.dataset.spi.AbstractErrorDataSet
computeLimits, fireInvalidated, getErrorType, getThis, lock, setErrorType, unlock
-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, binarySearchX, binarySearchY, clearMetaInfo, getDataCount, getDataLabel, getDataLabelMap, getDataStyleMap, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getName, getStyle, getUndefValue, getWarningList, getXIndex, getXMax, getXMin, getXRange, getYIndex, getYMax, getYMin, getYRange, isAutoNotification, minNeigbourSearchX, removeDataLabel, removeStyle, setAutoNotifaction, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getDataCount, getDataLabel, getName, getStyle, getStyle, getUndefValue, getValue, getXIndex, getXMax, getXMin, getYIndex, getYMax, getYMin, isAutoNotification, lock, setAutoNotifaction, setStyle, unlock
-
Methods inherited from interface de.gsi.dataset.DataSetError
getErrorType, getXErrorNegative, getXErrorPositive, getXErrorsNegative, getXErrorsPositive, getYErrorNegative, getYErrorPositive
-
-
-
-
Constructor Detail
-
DoubleErrorDataSet
public DoubleErrorDataSet(java.lang.String name)
Deprecated.Creates a new instance ofDoubleErrorDataSet.- Parameters:
name- name of this DataSet.- Throws:
java.lang.IllegalArgumentException- ifnameisnull
-
DoubleErrorDataSet
public DoubleErrorDataSet(java.lang.String name, int initalSize)Deprecated.Creates a new instance ofDoubleErrorDataSet.- Parameters:
name- name of this DataSet.initalSize- maximum capacity of buffer- Throws:
java.lang.IllegalArgumentException- ifnameisnull
-
DoubleErrorDataSet
public DoubleErrorDataSet(de.gsi.dataset.DataSet another)
Deprecated.Creates a new instance ofDoubleDataSetas copy of another (deep-copy).- Parameters:
another- name of this DataSet.
-
DoubleErrorDataSet
public DoubleErrorDataSet(java.lang.String name, double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, int nData, boolean deepCopy)Deprecated.Creates a new instance of
DoubleErrorDataSet.- Parameters:
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 takendeepCopy- if true, the input array is copied- Throws:
java.lang.IllegalArgumentException- if any of parameters isnullor if arrays with coordinates have different lengths
-
-
Method Detail
-
getXValues
public double[] getXValues()
Deprecated.- Specified by:
getXValuesin interfacede.gsi.dataset.DataSet
-
getYValues
public double[] getYValues()
Deprecated.- Specified by:
getYValuesin interfacede.gsi.dataset.DataSet
-
getYErrorsPositive
public double[] getYErrorsPositive()
Deprecated.- Specified by:
getYErrorsPositivein interfacede.gsi.dataset.DataSetError
-
getYErrorsNegative
public double[] getYErrorsNegative()
Deprecated.- Specified by:
getYErrorsNegativein interfacede.gsi.dataset.DataSetError
-
getDataCount
public int getDataCount()
Deprecated.- Specified by:
getDataCountin interfacede.gsi.dataset.DataSet
-
clearData
public DoubleErrorDataSet clearData()
Deprecated.clears all data- Returns:
- itself (fluent design)
-
getX
public double getX(int index)
Deprecated.- Specified by:
getXin interfacede.gsi.dataset.DataSet
-
getY
public double getY(int index)
Deprecated.- Specified by:
getYin interfacede.gsi.dataset.DataSet
-
getXErrorNegative
public double getXErrorNegative(int index)
Deprecated.- Specified by:
getXErrorNegativein interfacede.gsi.dataset.DataSetError
-
getXErrorPositive
public double getXErrorPositive(int index)
Deprecated.- Specified by:
getXErrorPositivein interfacede.gsi.dataset.DataSetError
-
getYErrorNegative
public double getYErrorNegative(int index)
Deprecated.- Specified by:
getYErrorNegativein interfacede.gsi.dataset.DataSetError
-
getYErrorPositive
public double getYErrorPositive(int index)
Deprecated.- Specified by:
getYErrorPositivein interfacede.gsi.dataset.DataSetError
-
set
public DoubleErrorDataSet set(int index, double x, double y)
Deprecated.replaces point coordinate of existing data point- Specified by:
setin interfacede.gsi.dataset.EditableDataSet- Parameters:
index- the index of the data pointx- new horizontal coordinatey- new vertical coordinate N.B. errors are implicitly assumed to be zero- Returns:
- itself (fluent design)
-
set
public DoubleErrorDataSet set(int index, double x, double y, double yErrorNeg, double yErrorPos)
Deprecated.replaces point coordinate of existing data point- Parameters:
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)- Returns:
- itself (fluent design)
-
add
public DoubleErrorDataSet add(double x, double y)
Deprecated.Add point to the DoublePoints object. Errors in y are assumed 0.- Parameters:
x- the new x coordinatey- the new y coordinate- Returns:
- itself
-
add
public DoubleErrorDataSet add(double x, double y, double yErrorNeg, double yErrorPos)
Deprecated.Add point to the DoublePoints object- Parameters:
x- the new x coordinatey- the new y coordinateyErrorNeg- the +dy erroryErrorPos- the -dy error- Returns:
- itself
-
remove
public de.gsi.dataset.EditableDataSet remove(int index)
Deprecated.- Specified by:
removein interfacede.gsi.dataset.EditableDataSet
-
remove
public DoubleErrorDataSet remove(int fromIndex, int toIndex)
Deprecated.remove sub-range of data points- Parameters:
fromIndex- start indextoIndex- stop index- Returns:
- itself (fluent design)
-
add
public de.gsi.dataset.EditableDataSet add(int index, double x, double y)Deprecated.- Specified by:
addin interfacede.gsi.dataset.EditableDataSet
-
add
public DoubleErrorDataSet add(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)
Deprecated.Initialises the data set with specified data.
Note: The method copies values from specified double arrays.- Parameters:
xValues- X coordinatesyValues- Y coordinatesyErrorsNeg- the +dy errorsyErrorsPos- the -dy errors- Returns:
- itself (fluent design)
-
set
public DoubleErrorDataSet set(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos, boolean copy)
Deprecated.Initialises the data set with specified data.
Note: The method copies values from specified double arrays.- Parameters:
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)- Returns:
- itself (fluent design)
-
set
public DoubleErrorDataSet set(double[] xValues, double[] yValues, double[] yErrorsNeg, double[] yErrorsPos)
Deprecated.Initialises the data set with specified data.
Note: The method copies values from specified double arrays.- Parameters:
xValues- X coordinatesyValues- Y coordinatesyErrorsNeg- the +dy errorsyErrorsPos- the -dy errors- Returns:
- itself (fluent design)
-
set
public DoubleErrorDataSet set(de.gsi.dataset.DataSet other)
Deprecated.clear old data and overwrite with data from 'other' data set (deep copy)- Parameters:
other- the other data set- Returns:
- itself (fluent design)
-
-