time-to-botec/squiggle/node_modules/@stdlib/stats/incr/meanvar/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

42 lines
956 B
Plaintext

{{alias}}( [out] )
Returns an accumulator function which incrementally computes an arithmetic
mean and unbiased sample variance.
If provided a value, the accumulator function returns updated accumulated
values. If not provided a value, the accumulator function returns the
current accumulated values.
If provided `NaN`, the accumulated values are equal to `NaN` for all future
invocations.
Parameters
----------
out: Array|TypedArray (optional)
Output array.
Returns
-------
acc: Function
Accumulator function.
Examples
--------
> var accumulator = {{alias}}();
> var mv = accumulator()
null
> mv = accumulator( 2.0 )
[ 2.0, 0.0 ]
> mv = accumulator( -5.0 )
[ -1.5, 24.5 ]
> mv = accumulator( 3.0 )
[ 0.0, 19.0 ]
> mv = accumulator( 5.0 )
[ 1.25, ~18.92 ]
> mv = accumulator()
[ 1.25, ~18.92 ]
See Also
--------