Class CircularDoubleErrorDataSet

    • Constructor Detail

      • CircularDoubleErrorDataSet

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

      • add

        public CircularDoubleErrorDataSet 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 CircularDoubleErrorDataSet add​(double x,
                                              double y,
                                              double yErrorNeg,
                                              double yErrorPos,
                                              java.lang.String label)
        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
        label - the data label
        Returns:
        itself
      • add

        public CircularDoubleErrorDataSet add​(double x,
                                              double y,
                                              double yErrorNeg,
                                              double yErrorPos,
                                              java.lang.String label,
                                              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
        label - the data label
        style - the data style string
        Returns:
        itself
      • add

        public CircularDoubleErrorDataSet add​(double[] xVals,
                                              double[] yVals,
                                              double[] yErrNeg,
                                              double[] yErrPos)

        Initialises the data set with specified data.

        Note: The method copies values from specified double arrays.
        Parameters:
        xVals - the new x coordinates
        yVals - the new y coordinates
        yErrNeg - the +dy errors
        yErrPos - the -dy errors
        Returns:
        itself
      • getDataCount

        public int getDataCount​(int dimIndex)
        Description copied from interface: DataSet
        Get the number of data points in the data set for a specific dimension.
        Specified by:
        getDataCount in interface DataSet
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        Returns:
        the number of data points
      • 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<CircularDoubleErrorDataSet>
        Parameters:
        index - of the data label
        Returns:
        data point label specified by the index or null if no label has been specified
      • getErrorNegative

        public double getErrorNegative​(int dimIndex,
                                       int index)
        Description copied from interface: DataSetError
        Returns the negative error along the 'dimIndex' axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getErrorNegative in interface DataSetError
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        index - of negative 'dimIndex' error to be returned.
        Returns:
        negative 'dimIndex' error
      • getErrorPositive

        public double getErrorPositive​(int dimIndex,
                                       int index)
        Description copied from interface: DataSetError
        Returns the positive error along the 'dimIndex' axis of a point specified by the index. Please note that errors are assumed to be always positive!
        Specified by:
        getErrorPositive in interface DataSetError
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        index - of positive 'dimIndex' error to be returned.
        Returns:
        positive 'dimIndex' error
      • 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<CircularDoubleErrorDataSet>
        Parameters:
        index - the index of the specific data point
        Returns:
        user-specific data set style description (ie. may be set by user)
      • get

        public final double get​(int dimIndex,
                                int index)
        Description copied from interface: DataSet
        Gets the x value of the data point with the index i
        Specified by:
        get in interface DataSet
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        index - data point index
        Returns:
        the x value
      • addDataLabel

        public java.lang.String addDataLabel​(int index,
                                             java.lang.String label)
        Description copied from class: AbstractDataSet
        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.
        Overrides:
        addDataLabel in class AbstractDataSet<CircularDoubleErrorDataSet>
        Parameters:
        index - of the data point
        label - for the data point specified by the index
        Returns:
        the previously set label or null if no label has been specified
      • addDataStyle

        public java.lang.String addDataStyle​(int index,
                                             java.lang.String style)
        Description copied from class: AbstractDataSet
        A string representation of the CSS style associated with this specific DataSet data point. @see #getStyle()
        Overrides:
        addDataStyle in class AbstractDataSet<CircularDoubleErrorDataSet>
        Parameters:
        index - the index of the specific data point
        style - string for the data point specific CSS-styling
        Returns:
        itself (fluent interface)
      • removeStyle

        public java.lang.String removeStyle​(int index)
        Description copied from class: AbstractDataSet
        A string representation of the CSS style associated with this specific DataSet data point. @see #getStyle()
        Overrides:
        removeStyle in class AbstractDataSet<CircularDoubleErrorDataSet>
        Parameters:
        index - the index of the specific data point
        Returns:
        itself (fluent interface)
      • removeDataLabel

        public java.lang.String removeDataLabel​(int index)
        Description copied from class: AbstractDataSet
        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.
        Overrides:
        removeDataLabel in class AbstractDataSet<CircularDoubleErrorDataSet>
        Parameters:
        index - of the data point
        Returns:
        the previously set label or null if no label has been specified