Interface QuantileAccumulator
-
- All Known Implementing Classes:
FullStorageAccumulator
,NoStorageAccumulator
,TDigestAccumulator
public interface QuantileAccumulator
Interface for quantile accumulator.- Author:
- Peter Knoppers
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getQuantile(Tally tally, double probability)
Compute (or approximate) the value that corresponds to the given fraction (percentile).double
ingest(double value)
Ingest one value with weight 1.void
initialize()
Reset (clear all accumulated information).
-
-
-
Method Detail
-
ingest
double ingest(double value)
Ingest one value with weight 1. Should be called only from the Tally object and AFTER processing the value in the tally.- Parameters:
value
- double; the value- Returns:
- double; the ingested value
- Throws:
IllegalArgumentException
- when the ingested value is NaN
-
getQuantile
double getQuantile(Tally tally, double probability)
Compute (or approximate) the value that corresponds to the given fraction (percentile).- Parameters:
tally
- Tally; the tally object that accumulates mean, minimum, maximum, count, etc.probability
- double; value between 0.0 and 1.0 (both inclusive)- Returns:
- double; the computed or approximated quantile value
- Throws:
IllegalArgumentException
- when the probability is less than 0 or larger than 1NullPointerException
- when tally is null
-
initialize
void initialize()
Reset (clear all accumulated information).
-
-