public static class Histogram.LinearBinScheme extends Object implements Histogram.BinScheme
| Constructor and Description |
|---|
LinearBinScheme(int numBins,
double max)
Create a linear bin scheme with the specified number of bins and the maximum value to be counted in the bins.
|
| 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 LinearBinScheme(int numBins,
double max)
numBins - the number of bins; must be at least 2max - 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