T
- Data typepublic class ObjHistogram<T> extends AbstractStaticHistogram
Modifier and Type | Class and Description |
---|---|
static interface |
ObjHistogram.BucketFactory<T>
Function to make new buckets.
|
class |
ObjHistogram.Iter
Iterator class.
|
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Object[] |
data
Data store
|
(package private) java.lang.Object[] |
special
Special value storage: infinity, NaN
|
(package private) ObjHistogram.BucketFactory<T> |
supplier
Supplier for empty bins.
|
base, binsize, max, offset, size
CACHE_SHIFT
Constructor and Description |
---|
ObjHistogram(int bins,
double min,
double max,
ObjHistogram.BucketFactory<T> supplier)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
get(double coord)
Access the value of a bin with new data.
|
protected T |
getSpecial(int idx)
Ensure that we have storage for special values (infinity, NaN)
|
ObjHistogram.Iter |
iter()
Get an iterator over all histogram bins.
|
getBinNr, getBinsize, getCoverMaximum, getCoverMinimum, getNumBins, growSize
java.lang.Object[] data
java.lang.Object[] special
ObjHistogram.BucketFactory<T> supplier
public ObjHistogram(int bins, double min, double max, ObjHistogram.BucketFactory<T> supplier)
bins
- Number of binsmin
- Cover minimummax
- Cover maximumsupplier
- Supplier to fill empty binspublic T get(double coord)
coord
- Coordinateprotected T getSpecial(int idx)
idx
- Index to return.public ObjHistogram.Iter iter()
AbstractStaticHistogram
iter
in interface Histogram
iter
in class AbstractStaticHistogram
Copyright © 2019 ELKI Development Team. License information.