repl.txt (967B)
1 2 {{alias}}( [out] ) 3 Returns an accumulator function which incrementally computes an arithmetic 4 mean and corrected sample standard deviation. 5 6 If provided a value, the accumulator function returns updated accumulated 7 values. If not provided a value, the accumulator function returns the 8 current accumulated values. 9 10 If provided `NaN`, the accumulated values are equal to `NaN` for all future 11 invocations. 12 13 Parameters 14 ---------- 15 out: Array|TypedArray (optional) 16 Output array. 17 18 Returns 19 ------- 20 acc: Function 21 Accumulator function. 22 23 Examples 24 -------- 25 > var accumulator = {{alias}}(); 26 > var ms = accumulator() 27 null 28 > ms = accumulator( 2.0 ) 29 [ 2.0, 0.0 ] 30 > ms = accumulator( -5.0 ) 31 [ -1.5, ~4.95 ] 32 > ms = accumulator( 3.0 ) 33 [ 0.0, ~4.36 ] 34 > ms = accumulator( 5.0 ) 35 [ 1.25, ~4.35 ] 36 > ms = accumulator() 37 [ 1.25, ~4.35 ] 38 39 See Also 40 -------- 41