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 void
addValue(R row, double value)
int
getActiveDensity(int index)
R
getActiveRowAtBin(int j, int index)
int
getBin(double value)
double
getBinEndValue(int bin)
double
getBinStartValue(int bin)
int
getDensity(int index)
int
getMaxActiveDensity()
int
getMaxDensity()
double
getMaxValue()
double
getMinValue()
int
getNumberOfBins()
int
getOverflowBin()
int
getUnderflowBin()
java.lang.String
toString()
-
-
-
Method Detail
-
addValue
public void addValue(R row, double value)
-
getActiveDensity
public int getActiveDensity(int index)
- Specified by:
getActiveDensity
in interfaceHistogram<R>
-
getActiveRowAtBin
public R getActiveRowAtBin(int j, int index)
- Specified by:
getActiveRowAtBin
in interfaceHistogram<R>
-
getDensity
public int getDensity(int index)
- Specified by:
getDensity
in interfaceHistogram<R>
-
getNumberOfBins
public int getNumberOfBins()
- Specified by:
getNumberOfBins
in interfaceHistogram<R>
-
getMinValue
public double getMinValue()
- Specified by:
getMinValue
in interfaceHistogram<R>
-
getMaxValue
public double getMaxValue()
- Specified by:
getMaxValue
in interfaceHistogram<R>
-
getBinStartValue
public double getBinStartValue(int bin)
- Specified by:
getBinStartValue
in interfaceHistogram<R>
-
getBinEndValue
public double getBinEndValue(int bin)
- Specified by:
getBinEndValue
in interfaceHistogram<R>
-
getMaxActiveDensity
public int getMaxActiveDensity()
- Specified by:
getMaxActiveDensity
in interfaceHistogram<R>
-
getMaxDensity
public int getMaxDensity()
- Specified by:
getMaxDensity
in interfaceHistogram<R>
-
getUnderflowBin
public int getUnderflowBin()
-
getOverflowBin
public int getOverflowBin()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-