strata::Sum¶
Part of Reductions.
The sum, in Acc if one is given, else in the type T + T gives.
Sum<double> sums floats in double, and ints without overflow far longer. The sum of no values is the default-constructed accumulator, zero.
Template parameters
| Name | Description |
|---|---|
Acc | The accumulator type, or void for the type T + T gives: an int for an int8, a float for a float, a length for a length. |
Members¶
accumulator¶
What the sum 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 accumulator itself, whatever the count.