public abstract class ArrayBinList extends java.lang.Object implements BinList
BinList.Result
Modifier | Constructor and Description |
---|---|
protected |
ArrayBinList(int size,
Combiner combiner)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static BinList.Result |
createDoubleMaskResult(java.util.BitSet mask,
double[] values)
Returns a Result implementation based on a bin occupation mask
and an array of bin content values.
|
protected abstract double |
getBinResultInt(int index)
Variant of the
getValue method
that takes a 32-bit index. |
Combiner |
getCombiner()
Returns the combination method used for bins.
|
BinList.Result |
getResult()
Returns an object containing the result values accumulated into
the bins so far.
|
long |
getSize()
Returns the maximum number of bins.
|
void |
submitToBin(long lndex,
double datum)
Adds a given numeric value to the bin at the given index.
|
protected abstract void |
submitToBinInt(int index,
double value)
Variant of the
addToBin method
that takes a 32-bit index. |
protected ArrayBinList(int size, Combiner combiner)
size
- bin countcombiner
- combinerprotected abstract void submitToBinInt(int index, double value)
addToBin
method
that takes a 32-bit index.index
- bin indexvalue
- increment for the current bin valueprotected abstract double getBinResultInt(int index)
getValue
method
that takes a 32-bit index.index
- bin indexpublic void submitToBin(long lndex, double datum)
BinList
submitToBin
in interface BinList
lndex
- bin indexdatum
- finite value to submit to the binpublic long getSize()
BinList
public Combiner getCombiner()
BinList
getCombiner
in interface BinList
public BinList.Result getResult()
BinList
It is up to implementations to decide how to implement this method.
In some cases the return value may be an adapter that extracts results
as required from the data structure used for value accumulation,
but in others it may return a new data structure which copies
the accumulated values to a more compact form up front.
Therefore this may or may not be an expensive method, and the return
value may or may not be affected by subsequent
BinList.submitToBin(long, double)
calls.
public static BinList.Result createDoubleMaskResult(java.util.BitSet mask, double[] values)
mask
- bin occupation maskvalues
- data values per binCopyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.