BinList.Result
Constructor and Description |
---|
HashBinList(long size,
Combiner combiner)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static BinList.Result |
createHashResult(java.util.Map<java.lang.Long,java.lang.Double> map)
Returns a new Result instance based on a Map.
|
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 index,
double value)
Adds a given numeric value to the bin at the given index.
|
public HashBinList(long size, Combiner combiner)
size
- number of binscombiner
- combinerpublic long getSize()
BinList
public Combiner getCombiner()
BinList
getCombiner
in interface BinList
public void submitToBin(long index, double value)
BinList
submitToBin
in interface BinList
index
- bin indexvalue
- finite value to submit to the binpublic 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 createHashResult(java.util.Map<java.lang.Long,java.lang.Double> map)
map
- map of valuesmap
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.