Package app.babylon.table.aggregation
Class AccumulatorDouble
java.lang.Object
app.babylon.table.aggregation.AccumulatorDouble
- All Implemented Interfaces:
DoubleConsumer
Incrementally accumulates summary statistics for double values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(double value) voidaccept(CharSequence chars, int start, int length) Parses and accumulates a double from a character slice.doubleReturns the value of the requested aggregate.longgetCount()Returns the number of accumulated values.doublegetMax()Returns the maximum accumulated value.doublegetMean()Returns the arithmetic mean of accumulated values.doublegetMin()Returns the minimum accumulated value.doublegetSum()Returns the sum of accumulated values.doubleReturns the population variance of accumulated values.doubleReturns the sample variance of accumulated values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.DoubleConsumer
andThen
-
Constructor Details
-
AccumulatorDouble
public AccumulatorDouble()Creates an empty accumulator.
-
-
Method Details
-
accept
public void accept(double value) - Specified by:
acceptin interfaceDoubleConsumer
-
accept
Parses and accumulates a double from a character slice.- Parameters:
chars- source charactersstart- inclusive slice startlength- slice length
-
getCount
public long getCount()Returns the number of accumulated values.- Returns:
- accumulated count
-
getMin
public double getMin()Returns the minimum accumulated value.- Returns:
- minimum value
-
getMax
public double getMax()Returns the maximum accumulated value.- Returns:
- maximum value
-
getSum
public double getSum()Returns the sum of accumulated values.- Returns:
- sum of values
-
getMean
public double getMean()Returns the arithmetic mean of accumulated values.- Returns:
- mean value
-
getVariance
public double getVariance()Returns the population variance of accumulated values.- Returns:
- population variance
-
getVarianceSample
public double getVarianceSample()Returns the sample variance of accumulated values.- Returns:
- sample variance
-
get
Returns the value of the requested aggregate.- Parameters:
aggregate- aggregate to return- Returns:
- aggregate value
-