An AvgAggregator is an Aggregator that calculates the average of numeric values, returning the average as a Double. If no values were encountered, then the returned average is Double.NaN. This Aggregator overrides the terminateDoubleDouble method, so that the average is also available as a DoubleDouble. This allows the average to be used by other Aggregators as a high-precision DoubleDouble.
Create and use an AvgAggregator, with one of the following methods:
The values returned by the property of the object must be numeric.
The average is calculated as expected for the arithmetic mean, which is the sum of all values divided by the count of all values.