time-to-botec/js/node_modules/@stdlib/stats/incr/minmax/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
936 B
Plaintext

{{alias}}( [out] )
Returns an accumulator function which incrementally computes a minimum and
maximum.
If provided a value, the accumulator function returns an updated minimum and
maximum. If not provided a value, the accumulator function returns the
current minimum and maximum.
If provided `NaN`, the minimum and maximum 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 mm = accumulator()
null
> mm = accumulator( 2.0 )
[ 2.0, 2.0 ]
> mm = accumulator( -5.0 )
[ -5.0, 2.0 ]
> mm = accumulator( 3.0 )
[ -5.0, 3.0 ]
> mm = accumulator( 5.0 )
[ -5.0, 5.0 ]
> mm = accumulator()
[ -5.0, 5.0 ]
See Also
--------