Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/incr/summary/docs/types/index.d"

Index

Interfaces

Type aliases

Functions

Type aliases

accumulator

accumulator: (x?: undefined | number) => Summary | null

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:

    • count: count.
    • max: maximum value.
    • min: minimum value.
    • range: range.
    • midrange: mid-range.
    • sum: sum.
    • mean: arithmetic mean.
    • variance: unbiased sample variance.
    • stdev: corrected sample standard deviation.
    • skewness: corrected sample skewness.
    • kurtosis: corrected sample excess kurtosis.
  • For long running accumulations or accumulations of large numbers, care should be taken to prevent overflow.

param

value

returns

updated summary

Type declaration

    • (x?: undefined | number): Summary | null
    • Parameters

      • Optional x: undefined | number

      Returns Summary | null

Functions

Export assignment incrsummary

  • Returns an accumulator function which incrementally computes a statistical summary.

    Returns accumulator

    accumulator function

    Example

    var accumulator = incrsummary();
    
    var summary = accumulator();
    // returns {}
    
    summary = accumulator( 2.0 );
    // returns {...}
    
    summary = accumulator( -5.0 );
    // returns {...}
    
    summary = accumulator();
    // returns {...}