Class FixedBinsHistogram<R>
- java.lang.Object
-
- com.macrofocus.high_d.distributions.FixedBinsHistogram<R>
-
- All Implemented Interfaces:
Histogram<R>
public class FixedBinsHistogram<R> extends java.lang.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 Summary
Constructors Constructor Description FixedBinsHistogram(int nbins, double min, double max, Filter<R> filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(R row, double value)intgetActiveDensity(int index)RgetActiveRowAtBin(int j, int index)intgetBin(double value)doublegetBinEndValue(int bin)doublegetBinStartValue(int bin)intgetDensity(int index)intgetMaxActiveDensity()intgetMaxDensity()doublegetMaxValue()doublegetMinValue()intgetNumberOfBins()intgetOverflowBin()intgetUnderflowBin()java.lang.StringtoString()
-
-
-
Method Detail
-
addValue
public void addValue(R row, double value)
-
getActiveDensity
public int getActiveDensity(int index)
- Specified by:
getActiveDensityin interfaceHistogram<R>
-
getActiveRowAtBin
public R getActiveRowAtBin(int j, int index)
- Specified by:
getActiveRowAtBinin interfaceHistogram<R>
-
getDensity
public int getDensity(int index)
- Specified by:
getDensityin interfaceHistogram<R>
-
getNumberOfBins
public int getNumberOfBins()
- Specified by:
getNumberOfBinsin interfaceHistogram<R>
-
getMinValue
public double getMinValue()
- Specified by:
getMinValuein interfaceHistogram<R>
-
getMaxValue
public double getMaxValue()
- Specified by:
getMaxValuein interfaceHistogram<R>
-
getBinStartValue
public double getBinStartValue(int bin)
- Specified by:
getBinStartValuein interfaceHistogram<R>
-
getBinEndValue
public double getBinEndValue(int bin)
- Specified by:
getBinEndValuein interfaceHistogram<R>
-
getMaxActiveDensity
public int getMaxActiveDensity()
- Specified by:
getMaxActiveDensityin interfaceHistogram<R>
-
getMaxDensity
public int getMaxDensity()
- Specified by:
getMaxDensityin interfaceHistogram<R>
-
getUnderflowBin
public int getUnderflowBin()
-
getOverflowBin
public int getOverflowBin()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-