Class AveragingDataSet

    • Constructor Detail

      • AveragingDataSet

        public AveragingDataSet​(java.lang.String name)
        Parameters:
        name - data set name
      • AveragingDataSet

        public AveragingDataSet​(java.lang.String name,
                                int fuzzyCount)
        Parameters:
        name - data set name
        fuzzyCount - binning accuracy @see #setFuzzyCount
    • Method Detail

      • getFuzzyCount

        public int getFuzzyCount()
        Gets the fuzzy count.
        Returns:
        fuzzy count
      • setFuzzyCount

        public void setFuzzyCount​(int fuzzyCount)
        Sets the fuzzy count. The fuzzy count allows for a mismatch in the data count of the datasets added to the average. Datasets will be added if the size difference is less or equal to the fuzzy count. In case of a mismatch in size, the longer dataset will be truncated to the shorter one.
        Parameters:
        fuzzyCount - the fuzzy count
      • getAverageSize

        public int getAverageSize()
        Returns:
        number of data sets that are supposed to be averaged
      • setAverageSize

        public void setAverageSize​(int avgCount)
        Parameters:
        avgCount - number of data sets that are supposed to be averaged
      • getAverageCount

        public int getAverageCount()
        Returns:
        number of data sets that have been averaged
      • clear

        public void clear()
        clear all data
      • add

        public void add​(DataSet ds)
        Parameters:
        ds - new DataSet to be added to average
      • getDataCount

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

        public int getDataCount​(double xmin,
                                double xmax)
        Description copied from class: AbstractDataSet
        Gets the number of data points in the range xmin to xmax.
        Specified by:
        getDataCount in interface DataSet
        Overrides:
        getDataCount in class AbstractDataSet<AveragingDataSet>
        Parameters:
        xmin - the lower end of the range
        xmax - the upper end of the range
        Returns:
        the number of data points
      • getYValues

        public double[] getYValues()
        Returns:
        the y value array
      • getX

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

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

        public int getXIndex​(double x)
        Description copied from class: AbstractDataSet
        Gets the index of the data point closest to the given x coordinate. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.
        Specified by:
        getXIndex in interface DataSet
        Overrides:
        getXIndex in class AbstractDataSet<AveragingDataSet>
        Parameters:
        x - the x position of the data point
        Returns:
        the index of the data point
      • 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<AveragingDataSet>
        Parameters:
        index - the index of the specific data point
        Returns:
        user-specific data set style description (ie. may be set by user)