Interface Histogram.BinScheme
-
- All Known Implementing Classes:
Histogram.ConstantBinScheme
,Histogram.LinearBinScheme
- Enclosing class:
- Histogram
public static interface Histogram.BinScheme
An algorithm for determining the bin in which a value is to be placed as well as calculating the upper end of each bin.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
bins()
Get the number of bins.double
fromBin(int bin)
Determine the value at the upper range of the specified bin.int
toBin(double value)
Determine the 0-based bin number in which the supplied value should be placed.
-
-
-
Method Detail
-
bins
int bins()
Get the number of bins.- Returns:
- the number of bins
-
toBin
int toBin(double value)
Determine the 0-based bin number in which the supplied value should be placed.- Parameters:
value
- the value- Returns:
- the 0-based index of the bin
-
fromBin
double fromBin(int bin)
Determine the value at the upper range of the specified bin.- Parameters:
bin
- the 0-based bin number- Returns:
- the value at the upper end of the bin; or
negative infinity
if the bin number is negative orpositive infinity
if the 0-based bin number is greater than or equal to thenumber of bins
.
-
-