GMeanAccumulator

Output range for gmean.

Members

Functions

gmean
F gmean()
put
void put(Range r)
put
void put(T x)

Variables

count
size_t count;
prodAccumulator
ProdAccumulator!T prodAccumulator;

Examples

import mir.math.common: approxEqual;
import mir.ndslice.slice: sliced;

GMeanAccumulator!double x;
x.put([1.0, 2, 3, 4].sliced);
assert(x.gmean.approxEqual(2.21336384));
x.put(5);
assert(x.gmean.approxEqual(2.60517108));

Meta