Class NoStorageAccumulator
- java.lang.Object
-
- org.djutils.stats.summarizers.quantileaccumulator.NoStorageAccumulator
-
- All Implemented Interfaces:
QuantileAccumulator
public class NoStorageAccumulator extends Object implements 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 Summary
Constructors Constructor Description NoStorageAccumulator()
-
Method Summary
All Methods Instance Methods Concrete 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).String
toString()
-
-
-
Method Detail
-
ingest
public 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.- Specified by:
ingest
in interfaceQuantileAccumulator
- Parameters:
value
- double; the value- Returns:
- double; the ingested value
-
getQuantile
public double getQuantile(Tally tally, double probability)
Compute (or approximate) the value that corresponds to the given fraction (percentile).- Specified by:
getQuantile
in interfaceQuantileAccumulator
- 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
-
initialize
public void initialize()
Reset (clear all accumulated information).- Specified by:
initialize
in interfaceQuantileAccumulator
-
-