Class FixedBinsHistogram<R>

java.lang.Object
com.macrofocus.high_d.distributions.FixedBinsHistogram<R>
All Implemented Interfaces:
Histogram<R>

public class FixedBinsHistogram<R> extends Object implements Histogram<R>
A class that models a standard histogram. A histogram consists of a number of equally sized and contiguous bins that cover a certain interval. Values that are added to the histogram are classified into their corresponding bin, which means that the count of the bin is incremented. Values that fall outside the interval, are classified into the underflow resp. overflow bins.
  • Constructor Details

    • FixedBinsHistogram

      public FixedBinsHistogram(int nbins, double min, double max, Filter<R> filter)
  • Method Details

    • addValue

      public void addValue(R row, double value)
    • getActiveDensity

      public int getActiveDensity(int index)
      Specified by:
      getActiveDensity in interface Histogram<R>
    • getActiveRowAtBin

      public R getActiveRowAtBin(int j, int index)
      Specified by:
      getActiveRowAtBin in interface Histogram<R>
    • getDensity

      public int getDensity(int index)
      Specified by:
      getDensity in interface Histogram<R>
    • getNumberOfBins

      public int getNumberOfBins()
      Specified by:
      getNumberOfBins in interface Histogram<R>
    • getMinValue

      public double getMinValue()
      Specified by:
      getMinValue in interface Histogram<R>
    • getMaxValue

      public double getMaxValue()
      Specified by:
      getMaxValue in interface Histogram<R>
    • getBinStartValue

      public double getBinStartValue(int bin)
      Specified by:
      getBinStartValue in interface Histogram<R>
    • getBinEndValue

      public double getBinEndValue(int bin)
      Specified by:
      getBinEndValue in interface Histogram<R>
    • getMaxActiveDensity

      public int getMaxActiveDensity()
      Specified by:
      getMaxActiveDensity in interface Histogram<R>
    • getMaxDensity

      public int getMaxDensity()
      Specified by:
      getMaxDensity in interface Histogram<R>
    • getUnderflowBin

      public int getUnderflowBin()
    • getOverflowBin

      public int getOverflowBin()
    • getBin

      public int getBin(double value)
      Specified by:
      getBin in interface Histogram<R>
    • toString

      public String toString()
      Overrides:
      toString in class Object