time-to-botec

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

repl.txt (931B)


      1 
      2 {{alias}}( α )
      3     Returns an accumulator function which incrementally computes an
      4     exponentially weighted standard deviation, where α is a smoothing factor
      5     between 0 and 1.
      6 
      7     If provided a value, the accumulator function returns an updated standard
      8     deviation. If not provided a value, the accumulator function returns the
      9     current standard deviation.
     10 
     11     If provided `NaN` or a value which, when used in computations, results in
     12     `NaN`, the accumulated value is `NaN` for all future invocations.
     13 
     14     Parameters
     15     ----------
     16     α: number
     17         Smoothing factor (value between 0 and 1).
     18 
     19     Returns
     20     -------
     21     acc: Function
     22         Accumulator function.
     23 
     24     Examples
     25     --------
     26     > var accumulator = {{alias}}( 0.5 );
     27     > var s = accumulator()
     28     null
     29     > s = accumulator( 2.0 )
     30     0.0
     31     > s = accumulator( -5.0 )
     32     3.5
     33     > s = accumulator()
     34     3.5
     35 
     36     See Also
     37     --------
     38