Class AbstractTestFunction<D extends AbstractTestFunction<D>>

    • Constructor Detail

      • AbstractTestFunction

        public AbstractTestFunction​(java.lang.String name,
                                    int count)
        Parameters:
        name - data set name
        count - number of samples
    • Method Detail

      • generateX

        public double[] generateX​(int count)
        Description copied from interface: TestDataSet
        generate test data set
        Specified by:
        generateX in interface TestDataSet<D extends AbstractTestFunction<D>>
        Parameters:
        count - number of bins
        Returns:
        the generated array
      • get

        public 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
      • 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
      • getErrorNegative

        public final 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 final 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 final 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<D extends AbstractTestFunction<D>>
        Parameters:
        index - the index of the specific data point
        Returns:
        user-specific data set style description (ie. may be set by user)
      • set

        public DataSet set​(DataSet other,
                           boolean copy)
        Specified by:
        set in interface DataSet
        Parameters:
        other - Other DataSet to copy into this DataSet
        copy - true: perform a deep copy (default), false: reuse the other dataset's internal data structures (if applicable)
        Returns:
        itself (fluent design) -- N.B. existing update listener are preserved