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.DataSet2D,de.gsi.dataset.DataSetError,de.gsi.dataset.DataSetMetaData,de.gsi.dataset.EditableDataSet,de.gsi.dataset.event.EventSource,java.io.Serializable
public class DoubleErrorDataSet extends de.gsi.dataset.spi.AbstractErrorDataSet<DoubleErrorDataSet> implements de.gsi.dataset.DataSetError, de.gsi.dataset.EditableDataSet, de.gsi.dataset.DataSet2D
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, Serialized Form
-
-
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.DataSet2D 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... newValue)Deprecated.DoubleErrorDataSetclearData()Deprecated.clears all datadoubleget(int dimIndex, int index)Deprecated.intgetDataCount()Deprecated.doublegetErrorNegative(int dimIndex, int index)Deprecated.doublegetErrorPositive(int dimIndex, int index)Deprecated.double[]getErrorsNegative(int dimIndex)Deprecated.double[]getErrorsPositive(int dimIndex)Deprecated.double[]getXValues()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... newValue)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.DataSet2D other)Deprecated.clear old data and overwrite with data from 'other' data set (deep copy)de.gsi.dataset.EditableDataSetset(de.gsi.dataset.DataSet other, boolean copy)Deprecated.-
Methods inherited from class de.gsi.dataset.spi.AbstractErrorDataSet
fireInvalidated, getErrorType, getThis, lock, recomputeLimits, setErrorType
-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, binarySearch, clearMetaInfo, copyAxisDescription, copyDataLabelsAndStyles, copyMetaData, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getValue, getValues, getWarningList, hashCode, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getAxisDescription, getAxisDescriptions, getDataLabel, getIndex, getName, getStyle, getStyle, getValue, getValues, lock, recomputeLimits, set, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSet2D
getDimension, getValue, getX, getXIndex, getY, getYIndex
-
Methods inherited from interface de.gsi.dataset.DataSetError
getErrorNegative, getErrorPositive, getErrorType
-
-
-
-
Constructor Detail
-
DoubleErrorDataSet
public DoubleErrorDataSet(de.gsi.dataset.DataSet2D 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)
Deprecated.Creates a new instance ofDoubleErrorDataSet.- Parameters:
name- name of this DataSet.- Throws:
java.lang.IllegalArgumentException- ifnameisnull
-
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
-
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
-
-
Method Detail
-
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
-
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)
-
add
public de.gsi.dataset.EditableDataSet add(int index, double... newValue)Deprecated.- Specified by:
addin interfacede.gsi.dataset.EditableDataSet
-
clearData
public DoubleErrorDataSet clearData()
Deprecated.clears all data- Returns:
- itself (fluent design)
-
get
public double get(int dimIndex, int index)Deprecated.- Specified by:
getin interfacede.gsi.dataset.DataSet
-
getDataCount
public int getDataCount()
Deprecated.- Specified by:
getDataCountin interfacede.gsi.dataset.DataSet
-
getErrorNegative
public double getErrorNegative(int dimIndex, int index)Deprecated.- Specified by:
getErrorNegativein interfacede.gsi.dataset.DataSetError
-
getErrorPositive
public double getErrorPositive(int dimIndex, int index)Deprecated.- Specified by:
getErrorPositivein interfacede.gsi.dataset.DataSetError
-
getErrorsNegative
public double[] getErrorsNegative(int dimIndex)
Deprecated.- Specified by:
getErrorsNegativein interfacede.gsi.dataset.DataSetError
-
getErrorsPositive
public double[] getErrorsPositive(int dimIndex)
Deprecated.- Specified by:
getErrorsPositivein interfacede.gsi.dataset.DataSetError
-
getXValues
public double[] getXValues()
Deprecated.- Specified by:
getXValuesin interfacede.gsi.dataset.DataSet2D
-
getYValues
public double[] getYValues()
Deprecated.- Specified by:
getYValuesin interfacede.gsi.dataset.DataSet2D
-
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)
-
set
public DoubleErrorDataSet set(de.gsi.dataset.DataSet2D 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)
-
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(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(int index, double... newValue)
Deprecated.replaces point coordinate of existing data point- Specified by:
setin interfacede.gsi.dataset.EditableDataSet- Parameters:
index- the index of the data pointnewValue- new point coordinates- 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)
-
set
public de.gsi.dataset.EditableDataSet set(de.gsi.dataset.DataSet other, boolean copy)Deprecated.- Specified by:
setin interfacede.gsi.dataset.DataSet
-
-