Class DoubleDataSet

  • All Implemented Interfaces:
    de.gsi.dataset.DataSet, de.gsi.dataset.DataSet2D, de.gsi.dataset.DataSetMetaData, de.gsi.dataset.EditableDataSet, de.gsi.dataset.event.EventSource, java.io.Serializable

    public class DoubleDataSet
    extends de.gsi.dataset.spi.AbstractDataSet<DoubleDataSet>
    implements de.gsi.dataset.EditableDataSet, de.gsi.dataset.DataSet2D
    Deprecated.
    this is kept for reference/performance comparisons only
    Implementation of the DataSet interface which stores x,y values in two separate 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 with asymmetric errors in Y, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int dataMaxIndex
      Deprecated.
       
      protected double[] xValues
      Deprecated.
       
      protected double[] yValues
      Deprecated.
       
      • Fields inherited from class de.gsi.dataset.spi.AbstractDataSet

        axisListener, dimension
      • Fields inherited from interface de.gsi.dataset.DataSet

        DIM_X, DIM_Y, DIM_Z
      • Fields inherited from interface de.gsi.dataset.DataSetMetaData

        TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleDataSet​(de.gsi.dataset.DataSet2D another)
      Deprecated.
      Creates a new instance of DoubleDataSet as copy of another (deep-copy).
      DoubleDataSet​(java.lang.String name)
      Deprecated.
      Creates a new instance of DoubleDataSet.
      DoubleDataSet​(java.lang.String name, double[] xValues, double[] yValues, int initalSize, boolean deepCopy)
      Deprecated.
      Creates a new instance of DoubleDataSet.
      DoubleDataSet​(java.lang.String name, int initalSize)
      Deprecated.
      Creates a new instance of DoubleDataSet.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      DoubleDataSet add​(double[] xValuesNew, double[] yValuesNew)
      Deprecated.
      Initialises the data set with specified data.
      DoubleDataSet add​(double x, double y)
      Deprecated.
      Add point to the end of the data set
      DoubleDataSet add​(double x, double y, java.lang.String label)
      Deprecated.
      Add point to the DoublePoints object
      DoubleDataSet add​(int index, double... newValues)
      Deprecated.
      add point to the data set
      DoubleDataSet add​(int index, double x, double y, java.lang.String label)
      Deprecated.
      add point to the data set
      DoubleDataSet clearData()
      Deprecated.
      clear all data points
      double get​(int dimImdex, int index)
      Deprecated.
       
      int getDataCount()
      Deprecated.
       
      double[] getXValues()
      Deprecated.
       
      double[] getYValues()
      Deprecated.
       
      de.gsi.dataset.EditableDataSet remove​(int index)
      Deprecated.
      remove point from data set
      DoubleDataSet remove​(int fromIndex, int toIndex)
      Deprecated.
      removes sub-range of data points
      DoubleDataSet set​(double[] xValues, double[] yValues)
      Deprecated.
      Initialises the data set with specified data.
      DoubleDataSet set​(double[] xValues, double[] yValues, boolean copy)
      Deprecated.
      Initialises the data set with specified data.
      DoubleDataSet set​(int index, double... newValue)
      Deprecated.
       
      DoubleDataSet set​(de.gsi.dataset.DataSet2D other)
      Deprecated.
      clear old data and overwrite with data from 'other' data set (deep copy)
      de.gsi.dataset.EditableDataSet set​(de.gsi.dataset.DataSet other, boolean copy)
      Deprecated.
       
      • 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, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getThis, getValue, getValues, getWarningList, hashCode, lock, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
      • Methods inherited from class de.gsi.dataset.spi.AbstractStylable

        getStyle, setStyle
      • 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.EditableDataSet

        getEditConstraints, setEditConstraints, setName
      • Methods inherited from interface de.gsi.dataset.event.EventSource

        addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
    • Field Detail

      • xValues

        protected double[] xValues
        Deprecated.
      • yValues

        protected double[] yValues
        Deprecated.
      • dataMaxIndex

        protected int dataMaxIndex
        Deprecated.
    • Constructor Detail

      • DoubleDataSet

        public DoubleDataSet​(de.gsi.dataset.DataSet2D another)
        Deprecated.
        Creates a new instance of DoubleDataSet as copy of another (deep-copy).
        Parameters:
        another - name of this DataSet.
      • DoubleDataSet

        public DoubleDataSet​(java.lang.String name)
        Deprecated.
        Creates a new instance of DoubleDataSet.
        Parameters:
        name - name of this DataSet.
        Throws:
        java.lang.IllegalArgumentException - if name is null
      • DoubleDataSet

        public DoubleDataSet​(java.lang.String name,
                             double[] xValues,
                             double[] yValues,
                             int initalSize,
                             boolean deepCopy)
        Deprecated.

        Creates a new instance of DoubleDataSet.

        The user than specify via the copy parameter, whether the dataset operates directly on the input arrays themselves or on a copies of the input arrays. If the dataset operates directly on the input arrays, these arrays must not be modified outside of this data set.
        Parameters:
        name - name of this data set.
        xValues - X coordinates
        yValues - Y coordinates
        initalSize - initial buffer size
        deepCopy - if true, the input array is copied
        Throws:
        java.lang.IllegalArgumentException - if any of parameters is null or if arrays with coordinates have different lengths
      • DoubleDataSet

        public DoubleDataSet​(java.lang.String name,
                             int initalSize)
        Deprecated.
        Creates a new instance of DoubleDataSet.
        Parameters:
        name - name of this DataSet.
        initalSize - initial buffer size
        Throws:
        java.lang.IllegalArgumentException - if name is null
    • Method Detail

      • add

        public DoubleDataSet add​(double x,
                                 double y)
        Deprecated.
        Add point to the end of the data set
        Parameters:
        x - index
        y - index
        Returns:
        itself
      • add

        public DoubleDataSet add​(double x,
                                 double y,
                                 java.lang.String label)
        Deprecated.
        Add point to the DoublePoints object
        Parameters:
        x - index
        y - index
        label - the data label
        Returns:
        itself
      • add

        public DoubleDataSet add​(double[] xValuesNew,
                                 double[] yValuesNew)
        Deprecated.

        Initialises the data set with specified data.

        Note: The method copies values from specified double arrays.
        Parameters:
        xValuesNew - X coordinates
        yValuesNew - Y coordinates
        Returns:
        itself
      • add

        public DoubleDataSet add​(int index,
                                 double... newValues)
        Deprecated.
        add point to the data set
        Specified by:
        add in interface de.gsi.dataset.EditableDataSet
        Parameters:
        index - data point index at which the new data point should be added
        newValues - coordinate of the new data point
        Returns:
        itself (fluent design)
      • add

        public DoubleDataSet add​(int index,
                                 double x,
                                 double y,
                                 java.lang.String label)
        Deprecated.
        add point to the data set
        Parameters:
        index - data point index at which the new data point should be added
        x - horizontal coordinate of the new data point
        y - vertical coordinate of the new data point
        label - data point label (see CategoryAxis)
        Returns:
        itself (fluent design)
      • clearData

        public DoubleDataSet clearData()
        Deprecated.
        clear all data points
        Returns:
        itself (fluent design)
      • get

        public double get​(int dimImdex,
                          int index)
        Deprecated.
        Specified by:
        get in interface de.gsi.dataset.DataSet
      • getDataCount

        public int getDataCount()
        Deprecated.
        Specified by:
        getDataCount in interface de.gsi.dataset.DataSet
      • getXValues

        public double[] getXValues()
        Deprecated.
        Specified by:
        getXValues in interface de.gsi.dataset.DataSet2D
      • getYValues

        public double[] getYValues()
        Deprecated.
        Specified by:
        getYValues in interface de.gsi.dataset.DataSet2D
      • remove

        public de.gsi.dataset.EditableDataSet remove​(int index)
        Deprecated.
        remove point from data set
        Specified by:
        remove in interface de.gsi.dataset.EditableDataSet
        Parameters:
        index - data point which should be removed
        Returns:
        itself (fluent design)
      • remove

        public DoubleDataSet remove​(int fromIndex,
                                    int toIndex)
        Deprecated.
        removes sub-range of data points
        Parameters:
        fromIndex - start index
        toIndex - stop index
        Returns:
        itself (fluent design)
      • set

        public DoubleDataSet set​(de.gsi.dataset.DataSet2D other)
        Deprecated.
        clear old data and overwrite with data from 'other' data set (deep copy)
        Parameters:
        other - the source data set
        Returns:
        itself (fluent design)
      • set

        public DoubleDataSet set​(double[] xValues,
                                 double[] yValues)
        Deprecated.

        Initialises the data set with specified data.

        Note: The method copies values from specified double arrays.
        Parameters:
        xValues - X coordinates
        yValues - Y coordinates
        Returns:
        itself
      • set

        public DoubleDataSet set​(double[] xValues,
                                 double[] yValues,
                                 boolean copy)
        Deprecated.

        Initialises the data set with specified data.

        Note: The method copies values from specified double arrays.
        Parameters:
        xValues - X coordinates
        yValues - Y coordinates
        copy - true: makes an internal copy, false: use the pointer as is (saves memory allocation
        Returns:
        itself
      • set

        public DoubleDataSet set​(int index,
                                 double... newValue)
        Deprecated.
        Specified by:
        set in interface de.gsi.dataset.EditableDataSet
      • set

        public de.gsi.dataset.EditableDataSet set​(de.gsi.dataset.DataSet other,
                                                  boolean copy)
        Deprecated.
        Specified by:
        set in interface de.gsi.dataset.DataSet