Class AccumulatorDouble

java.lang.Object
app.babylon.table.aggregation.AccumulatorDouble
All Implemented Interfaces:
DoubleConsumer

public class AccumulatorDouble extends Object implements DoubleConsumer
Incrementally accumulates summary statistics for double values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty accumulator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(double value)
     
    void
    accept(CharSequence chars, int start, int length)
    Parses and accumulates a double from a character slice.
    double
    get(Aggregate aggregate)
    Returns the value of the requested aggregate.
    long
    Returns the number of accumulated values.
    double
    Returns the maximum accumulated value.
    double
    Returns the arithmetic mean of accumulated values.
    double
    Returns the minimum accumulated value.
    double
    Returns the sum of accumulated values.
    double
    Returns the population variance of accumulated values.
    double
    Returns the sample variance of accumulated values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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:
      accept in interface DoubleConsumer
    • accept

      public void accept(CharSequence chars, int start, int length)
      Parses and accumulates a double from a character slice.
      Parameters:
      chars - source characters
      start - inclusive slice start
      length - 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

      public double get(Aggregate aggregate)
      Returns the value of the requested aggregate.
      Parameters:
      aggregate - aggregate to return
      Returns:
      aggregate value