public class MapBinnedData<K extends Comparable<K>> extends Object implements BinnedData
| Modifier and Type | Class and Description |
|---|---|
static interface |
MapBinnedData.BinMapper<K extends Comparable<K>>
Defines the mapping of numerical values to map keys.
|
BinnedData.Bin| Constructor and Description |
|---|
MapBinnedData(int nset,
MapBinnedData.BinMapper<K> mapper)
Constructs a new BinnedData.
|
| Modifier and Type | Method and Description |
|---|---|
static MapBinnedData.BinMapper<Long> |
createBinMapper(boolean logFlag,
double binWidth,
double binBase)
Constructs a new linear or logarithmic BinMapper object.
|
Iterator<BinnedData.Bin> |
getBinIterator(boolean includeEmpty)
Returns an iterator over the bins managed by this object.
|
MapBinnedData.BinMapper<K> |
getMapper()
Returns the BinMapper object used by this BinnedData.
|
int |
getSetCount()
Returns the number of subsets for which this object maintains bins.
|
boolean |
isInteger()
Indicates whether the count values in the bins are known to be
integers.
|
void |
submitDatum(double value,
double weight,
boolean[] setFlags)
Submits a value for inclusion in this BinnedData object.
|
public MapBinnedData(int nset,
MapBinnedData.BinMapper<K> mapper)
nset - the number of subsets that this BinnedData can deal withmapper - a BinMapper implementation that defines the bin rangespublic void submitDatum(double value,
double weight,
boolean[] setFlags)
BinnedDatasubmitDatum in interface BinnedDatavalue - value for inclusionweight - weightingsetFlags - array of flags, one for each subset;
true for inclusion, false for exclusionpublic Iterator<BinnedData.Bin> getBinIterator(boolean includeEmpty)
BinnedDataIt is inadvisable to call BinnedData.submitDatum(double, double, boolean[]) during the
lifetime of this iterator.
getBinIterator in interface BinnedDataincludeEmpty - if true, then all bins between the lowest
and highest must be iterated over. If false, then empty
bins may be omittedBinnedData.Bin instancespublic int getSetCount()
BinnedDatagetSetCount in interface BinnedDatapublic boolean isInteger()
BinnedDataisInteger in interface BinnedDataBin.getWeightedCount returns
are integer valuespublic MapBinnedData.BinMapper<K> getMapper()
public static MapBinnedData.BinMapper<Long> createBinMapper(boolean logFlag, double binWidth, double binBase)
logFlag - false for linear spacing, true for logarithmicbinWidth - bin spacing
(additive for linear, multiplicative for logarithmic)binBase - lower bound of one (any) bin; determines bin phaseCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.