BinList.Result| Constructor | Description |
|---|---|
HashBinList(long size,
Combiner combiner) |
Constructor.
|
| Modifier and Type | Method | 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()
BinListpublic Combiner getCombiner()
BinListgetCombiner in interface BinListpublic void submitToBin(long index,
double value)
BinListsubmitToBin in interface BinListindex - bin indexvalue - finite value to submit to the binpublic BinList.Result getResult()
BinListIt 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 valuesmapCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.