repl.txt (855B)
1 2 {{alias}}( [mean] ) 3 Returns an accumulator function which incrementally computes the coefficient 4 of variation (CV). 5 6 If provided a value, the accumulator function returns an updated accumulated 7 value. If not provided a value, the accumulator function returns the current 8 accumulated value. 9 10 If provided `NaN` or a value which, when used in computations, results in 11 `NaN`, the accumulated value is `NaN` for all future invocations. 12 13 Parameters 14 ---------- 15 mean: number (optional) 16 Known mean. 17 18 Returns 19 ------- 20 acc: Function 21 Accumulator function. 22 23 Examples 24 -------- 25 > var accumulator = {{alias}}(); 26 > var cv = accumulator() 27 null 28 > cv = accumulator( 2.0 ) 29 0.0 30 > cv = accumulator( 1.0 ) 31 ~0.47 32 > cv = accumulator() 33 ~0.47 34 35 See Also 36 -------- 37