
public abstract class AbstractStaticHistogram extends Object implements Histogram
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractStaticHistogram.Iter
Iterator class to iterate over all bins.
|
| Modifier and Type | Field and Description |
|---|---|
protected double |
base
Array 'base', i.e. the point of 0.0.
|
protected double |
binsize
Width of a bin.
|
protected double |
max
To avoid introducing an extra bucket for the maximum value.
|
protected int |
offset
Array shift to account for negative indices.
|
protected int |
size
Size of array storage.
|
CACHE_SHIFT| Constructor and Description |
|---|
AbstractStaticHistogram(int bins,
double min,
double max)
Histogram constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getBinNr(double coord)
Compute the bin number.
|
double |
getBinsize()
Get the size (width) of a bin.
|
double |
getCoverMaximum()
Get maximum (covered by bins, not data!)
|
double |
getCoverMinimum()
Get minimum (covered by bins, not data!)
|
int |
getNumBins()
Get the number of bins actually in use.
|
protected static int |
growSize(int current,
int requiredSize)
Compute the size to grow to.
|
abstract AbstractStaticHistogram.Iter |
iter()
Get an iterator over all histogram bins.
|
protected int offset
protected int size
protected double base
protected double max
protected double binsize
public AbstractStaticHistogram(int bins,
double min,
double max)
bins - Number of bins to use.min - Minimum Valuemax - Maximum Valueprotected int getBinNr(double coord)
coord - Coordinateprotected static int growSize(int current,
int requiredSize)
current - Current sizerequiredSize - Required sizepublic int getNumBins()
getNumBins in interface Histogrampublic double getBinsize()
getBinsize in interface Histogrampublic double getCoverMinimum()
getCoverMinimum in interface Histogrampublic double getCoverMaximum()
getCoverMaximum in interface Histogrampublic abstract AbstractStaticHistogram.Iter iter()