time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1240B)


      1 
      2 {{alias}}( W[, mean] )
      3     Returns an accumulator function which incrementally computes a moving
      4     corrected sample standard deviation.
      5 
      6     The `W` parameter defines the number of values over which to compute the
      7     moving corrected sample standard deviation.
      8 
      9     If provided a value, the accumulator function returns an updated moving
     10     corrected sample standard deviation. If not provided a value, the
     11     accumulator function returns the current moving corrected sample standard
     12     deviation.
     13 
     14     As `W` values are needed to fill the window buffer, the first `W-1` returned
     15     values are calculated from smaller sample sizes. Until the window is full,
     16     each returned value is calculated from all provided values.
     17 
     18     Parameters
     19     ----------
     20     W: integer
     21         Window size.
     22 
     23     mean: number (optional)
     24         Known mean.
     25 
     26     Returns
     27     -------
     28     acc: Function
     29         Accumulator function.
     30 
     31     Examples
     32     --------
     33     > var accumulator = {{alias}}( 3 );
     34     > var s = accumulator()
     35     null
     36     > s = accumulator( 2.0 )
     37     0.0
     38     > s = accumulator( -5.0 )
     39     ~4.95
     40     > s = accumulator( 3.0 )
     41     ~4.36
     42     > s = accumulator( 5.0 )
     43     ~5.29
     44     > s = accumulator()
     45     ~5.29
     46 
     47     See Also
     48     --------
     49