Class AveragingDataSet

    • Constructor Detail

      • AveragingDataSet

        public AveragingDataSet​(java.lang.String name,
                                int nDims)
        Parameters:
        name - data set name
        nDims - number of dimensions
      • AveragingDataSet

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

      • add

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

        public void clear()
        clear all data
      • getAverageCount

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

        public int getAverageSize()
        Returns:
        number of data sets that are supposed to be averaged
      • 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
      • getFuzzyCount

        public int getFuzzyCount()
        Gets the fuzzy count.
        Returns:
        fuzzy count
      • 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)
      • 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
      • setAverageSize

        public void setAverageSize​(int avgCount)
        Parameters:
        avgCount - number of data sets that are supposed to be averaged
      • 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
      • getValue

        public double getValue​(int dimIndex,
                               double... x)
        Description copied from interface: DataSet
        Returns the value along the 'dimIndex' axis of a point specified by the x coordinate.
        Specified by:
        getValue in interface DataSet
        Overrides:
        getValue in class AbstractDataSet<AveragingDataSet>
        Parameters:
        dimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')
        x - horizontal 'dimIndex' coordinate
        Returns:
        'dimIndex' value
      • 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