|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BinList
Represents a bounded list of bins. Each bin is given a fixed integer label, from zero to a specified maximum. In practice, not all the bins may be used, and implementations may take advantage of this.
Zero or more data values may be submitted to each bin, and a floating point result value may later be obtained from each bin, which forms a digest of the values submitted to that bin. The nature of this digest is determined by a Combiner object.
Instances of this class are in general not thread-safe.
Nested Class Summary | |
---|---|
static interface |
BinList.Result
Accessor for the results of accumulating values in a bit list. |
Method Summary | |
---|---|
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 datum)
Adds a given numeric value to the bin at the given index. |
Method Detail |
---|
long getSize()
Combiner getCombiner()
void submitToBin(long index, double datum)
index
- bin indexdatum
- finite value to submit to the binBinList.Result getResult()
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
submitToBin(long, double)
calls.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |