public static class Histogram.ConstantBinScheme extends Object implements Histogram.BinScheme
| Constructor and Description |
|---|
ConstantBinScheme(int bins, double min, double max)Create a bin scheme with the specified number of bins that all have the same width. |
| Modifier and Type | Method and Description |
|---|---|
int | bins()Get the number of bins. |
double | fromBin(int b)Determine the value at the upper range of the specified bin. |
int | toBin(double x)Determine the 0-based bin number in which the supplied value should be placed. |
public ConstantBinScheme(int bins,
double min,
double max)bins - the number of bins; must be at least 2min - the minimum value to be counted in the binsmax - the maximum value to be counted in the binspublic int bins()
Histogram.BinSchemebins in interface Histogram.BinSchemepublic double fromBin(int b)
Histogram.BinSchemefromBin in interface Histogram.BinSchemeb - the 0-based bin numbernegative infinity if the bin number is negative or positive infinity if the 0-based bin number is greater than or equal to the number of bins.public int toBin(double x)
Histogram.BinSchemetoBin in interface Histogram.BinSchemex - the value