Class AbstractBinningAlgorithm

    • Field Detail

      • m_NumDecimals

        protected int m_NumDecimals
        the number of decimals to show.
    • Constructor Detail

      • AbstractBinningAlgorithm

        public AbstractBinningAlgorithm()
    • Method Detail

      • setNumDecimals

        public void setNumDecimals​(int value)
        Sets the number of decimals to show in intervals.
        Parameters:
        value - the number of decimals
      • getNumDecimals

        public int getNumDecimals()
        Returns the number of decimals to show in the intervals.
        Returns:
        the number of decimals
      • numDecimalsTipText

        public String numDecimalsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • check

        protected <T> String check​(List<Binnable<T>> objects)
        Hook method for performing checks before binning.
        Parameters:
        objects - the objects to bin
        Returns:
        null if successful, otherwise error message
      • getMinMax

        protected <T> com.github.fracpete.javautils.struct.Struct2<Double,​Double> getMinMax​(List<Binnable<T>> objects)
        Determines the min/max from the binnable objects.
        Parameters:
        objects - the objects to determine the min/max from (using their associated value)
        Returns:
        the min/max
      • doGenerateBins

        protected abstract <T> List<Bin<T>> doGenerateBins​(List<Binnable<T>> objects)
        Performs the actual bin generation on the provided objects.
        Parameters:
        objects - the objects to bin
        Returns:
        the generated bins
        Throws:
        IllegalStateException - if binning fails
      • fillBins

        protected <T> void fillBins​(List<Bin<T>> bins,
                                    List<Binnable<T>> objects)
        Places the binnable objects in the respective bins.
        Parameters:
        bins - the bins to fill
        objects - the objects to distribute