Class FifoDoubleErrorDataSet

    • Constructor Detail

      • FifoDoubleErrorDataSet

        public FifoDoubleErrorDataSet​(java.lang.String name,
                                      int initalSize)
        Creates a new instance of FifoDoubleErrorDataSet.
        Parameters:
        name - name of this DataSet.
        initalSize - maximum circular buffer capacity
        Throws:
        java.lang.IllegalArgumentException - if name is null
      • FifoDoubleErrorDataSet

        public FifoDoubleErrorDataSet​(java.lang.String name,
                                      int initalSize,
                                      double maxDistance)
        Creates a new instance of FifoDoubleErrorDataSet.
        Parameters:
        name - name of this DataSet.
        initalSize - maximum circular buffer capacity
        maxDistance - maximum range before data points are being dropped
        Throws:
        java.lang.IllegalArgumentException - if name is null
    • Method Detail

      • getMaxDistance

        public double getMaxDistance()
        Returns:
        maximum range before data points are being dropped
      • setMaxDistance

        public void setMaxDistance​(double maxDistance)
        Parameters:
        maxDistance - maximum range before data points are being dropped
      • getX

        public double getX​(int index)
        Description copied from interface: DataSet
        Gets the x value of the data point with the index i
        Specified by:
        getX in interface DataSet
        Parameters:
        index - the index of the data point
        Returns:
        the x value
      • getY

        public double getY​(int index)
        Description copied from interface: DataSet
        Gets the y value of the data point with the index i
        Specified by:
        getY in interface DataSet
        Parameters:
        index - the index of the data point
        Returns:
        the y value
      • getStyle

        public java.lang.String getStyle​(int index)
        Description copied from class: AbstractDataSet
        A string representation of the CSS style associated with this specific DataSet data point. @see #getStyle()
        Specified by:
        getStyle in interface DataSet
        Overrides:
        getStyle in class AbstractDataSet<DoubleErrorDataSet>
        Parameters:
        index - the index of the specific data point
        Returns:
        user-specific data set style description (ie. may be set by user)
      • getXErrorNegative

        public double getXErrorNegative​(int index)
        Description copied from interface: DataSetError
        Returns the negative error along the X axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getXErrorNegative in interface DataSetError
        Parameters:
        index - of negative X error to be returned.
        Returns:
        negative X error
      • getXErrorPositive

        public double getXErrorPositive​(int index)
        Description copied from interface: DataSetError
        Returns the positive error along the X axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getXErrorPositive in interface DataSetError
        Parameters:
        index - of positive X error to be returned.
        Returns:
        positive X error
      • getYErrorNegative

        public double getYErrorNegative​(int index)
        Description copied from interface: DataSetError
        Returns the negative error along the Y axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getYErrorNegative in interface DataSetError
        Parameters:
        index - of negative Y error to be returned.
        Returns:
        negative Y error
      • getYErrorPositive

        public double getYErrorPositive​(int index)
        Description copied from interface: DataSetError
        Returns the positive error along the Y axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getYErrorPositive in interface DataSetError
        Parameters:
        index - of positive Y error to be returned.
        Returns:
        positive Y error
      • getDataLabel

        public java.lang.String getDataLabel​(int index)
        Description copied from class: AbstractDataSet
        Returns label of a data point specified by the index. The label can be used as a category name if CategoryStepsDefinition is used or for annotations displayed for data points.
        Specified by:
        getDataLabel in interface DataSet
        Overrides:
        getDataLabel in class AbstractDataSet<DoubleErrorDataSet>
        Parameters:
        index - of the data label
        Returns:
        data point label specified by the index or null if no label has been specified
      • getDataCount

        public int getDataCount()
        Description copied from interface: DataSet
        Get the number of data points in the data set
        Specified by:
        getDataCount in interface DataSet
        Returns:
        the number of data points
      • add

        public FifoDoubleErrorDataSet add​(double x,
                                          double y,
                                          double yErrorNeg,
                                          double yErrorPos)
        Add point to the DoublePoints object
        Parameters:
        x - the new x coordinate
        y - the new y coordinate
        yErrorNeg - the +dy error
        yErrorPos - the -dy error
        Returns:
        itself
      • add

        public FifoDoubleErrorDataSet add​(double x,
                                          double y,
                                          double yErrorNeg,
                                          double yErrorPos,
                                          java.lang.String tag)
        Add point to the DoublePoints object
        Parameters:
        x - the new x coordinate
        y - the new y coordinate
        yErrorNeg - the +dy error
        yErrorPos - the -dy error
        tag - the data tag
        Returns:
        itself
      • add

        public FifoDoubleErrorDataSet add​(double x,
                                          double y,
                                          double yErrorNeg,
                                          double yErrorPos,
                                          java.lang.String tag,
                                          java.lang.String style)
        Add point to the DoublePoints object
        Parameters:
        x - the new x coordinate
        y - the new y coordinate
        yErrorNeg - the +dy error
        yErrorPos - the -dy error
        tag - the data tag
        style - the data point style
        Returns:
        itself
      • add

        public FifoDoubleErrorDataSet 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.
        Parameters:
        xValues - the new x coordinates
        yValues - the new y coordinates
        yErrorsNeg - the +dy errors
        yErrorsPos - the -dy errors
        Returns:
        itself
      • expire

        public int expire​(double now)
        expire data points that are older than now minus length of the buffer, notifies a 'fireInvalidated()' in case data has been removed
        Parameters:
        now - the newest time-stamp
        Returns:
        number of items that have been removed
      • reset

        public void reset()
        remove all data points