Returns an accumulator function which incrementally computes a statistical summary.
accumulator function
var accumulator = incrsummary();
var summary = accumulator();
// returns {}
summary = accumulator( 2.0 );
// returns {...}
summary = accumulator( -5.0 );
// returns {...}
summary = accumulator();
// returns {...}
If provided a value, the accumulator function returns an updated summary; otherwise, the accumulator function returns the current summary.
Notes
The returned summary is an object containing the following fields:
For long running accumulations or accumulations of large numbers, care should be taken to prevent overflow.
value
updated summary