public class ExactMedianProcessor extends AbstractProcessor
Statistic.MEDIAN.
Note: this processor stores sll accepted sample values in memory in order to calculate the exact median. For very large data streams Statistic.APPROX_MEDIAN might be preferred.
Statistic,
StreamingSampleStatsnumAccepted, numNaN, numNoData, numOffered| Constructor and Description |
|---|
ExactMedianProcessor() |
| Modifier and Type | Method and Description |
|---|---|
Double |
get(Statistic stat)
Gets the value of the statistic calculated by this processor.
|
Collection<Statistic> |
getSupported()
Gets the
Statistics supported by this processor. |
void |
offer(Double sample)
Offers a sample value to the processor.
|
protected boolean |
update(Double sample)
Processes a sample value.
|
addNoDataRange, addNoDataValue, addRange, addRange, get, getNoDataRanges, getNumAccepted, getNumNaN, getNumNoData, getNumOffered, getRanges, getRangesType, isAccepted, setRangesTypepublic Collection<Statistic> getSupported()
Statistics supported by this processor.Statisticspublic final void offer(Double sample)
Integer.MAX_VALUE (available memory permitting).
Once this limit is reached, subsequent values will be
rejected and a warning message will be logged.offer in interface Processoroffer in class AbstractProcessorsample - the sample valueprotected boolean update(Double sample)
update in class AbstractProcessorsample - the sample valuetrue if the sample is accepted;
false otherwiseCopyright © 2009–2020. All rights reserved.