Class NoStorageAccumulator
java.lang.Object
org.djutils.stats.summarizers.quantileaccumulator.NoStorageAccumulator
- All Implemented Interfaces:
- QuantileAccumulator
The no storage accumulator accumulates nothing and estimates all requested quantiles from mean, standard deviation, etc. (as
 accumulated by the Tally class object). This is sensible if the input values are normally distributed. Do not use this
 accumulator when the input values are not normally distributes.
- Author:
- Peter Knoppers
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondoublegetCumulativeProbability(Tally tally, double quantile) Get, or estimate fraction of registered values between -infinity up to and including a given quantile.doublegetQuantile(Tally tally, double probability) Compute (or approximate) the value that corresponds to the given fraction (percentile).voidReset (clear all accumulated information).doubleregister(double value) Ingest one value with weight 1.toString()
- 
Constructor Details- 
NoStorageAccumulatorpublic NoStorageAccumulator()
 
- 
- 
Method Details- 
registerpublic double register(double value) Description copied from interface:QuantileAccumulatorIngest one value with weight 1. Should be called only from the Tally object and AFTER processing the value in the tally.- Specified by:
- registerin interface- QuantileAccumulator
- Parameters:
- value- the value
- Returns:
- the registered value
 
- 
getQuantileDescription copied from interface:QuantileAccumulatorCompute (or approximate) the value that corresponds to the given fraction (percentile).- Specified by:
- getQuantilein interface- QuantileAccumulator
- Parameters:
- tally- the tally object that accumulates mean, minimum, maximum, count, etc.
- probability- value between 0.0 and 1.0 (both inclusive)
- Returns:
- the computed or approximated quantile value
 
- 
getCumulativeProbabilitypublic double getCumulativeProbability(Tally tally, double quantile) throws IllegalArgumentException Description copied from interface:QuantileAccumulatorGet, or estimate fraction of registered values between -infinity up to and including a given quantile.- Specified by:
- getCumulativeProbabilityin interface- QuantileAccumulator
- Parameters:
- tally- the tally object that accumulates mean, minimum, maximum, count, etc.
- quantile- the given quantile
- Returns:
- the estimated or observed fraction of registered values between -infinity up to and including the given quantile. When this QuantileAccumulator has registered zero values; this method shall return NaN.
- Throws:
- IllegalArgumentException- when quantile is NaN
 
- 
toString
- 
initializepublic void initialize()Description copied from interface:QuantileAccumulatorReset (clear all accumulated information).- Specified by:
- initializein interface- QuantileAccumulator
 
 
-