strata::Mean¶
Part of Reductions.
The sum divided by the count.
Divided by the count converted to the accumulator where it converts (a float, a complex number), by a double otherwise (a length). The mean of no values is 0 / 0: a NaN in floating point, and in integers, where it has no value, a precondition violation.
Template parameters
| Name | Description |
|---|---|
Acc | The accumulator type, or void for a double for integers, as in NumPy, else the type T + T gives. |
Members¶
accumulator¶
template <typename T>
using strata::Mean< Acc >::accumulator = detail::mean_accumulator<Acc, T>::type
What the mean keeps while values come in.
identity¶
The sum of no values: zero.
accumulate¶
acc plus one value.
combine¶
The sum of two partial sums.
finalize¶
The sum divided by count.
Precondition
For an integer accumulator, count is not zero and fits the integer.