time-to-botec

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

repl.txt (2703B)


      1 
      2 {{alias}}( α, β[, options] )
      3     Returns an iterator for generating pseudorandom numbers drawn from a
      4     beta distribution.
      5 
      6     If an environment supports Symbol.iterator, the returned iterator is
      7     iterable.
      8 
      9     The function throws an error if `α <= 0` or `β <= 0`.
     10 
     11     Parameters
     12     ----------
     13     α: number
     14         First shape parameter.
     15 
     16     β: number
     17         Second shape parameter.
     18 
     19     options: Object (optional)
     20         Options.
     21 
     22     options.prng: Function (optional)
     23         Pseudorandom number generator (PRNG) for generating uniformly
     24         distributed pseudorandom numbers on the interval `[0,1)`. If provided,
     25         the `state` and `seed` options are ignored. In order to seed the
     26         returned iterator, one must seed the provided `prng` (assuming the
     27         provided `prng` is seedable).
     28 
     29     options.seed: integer|ArrayLikeObject<integer> (optional)
     30         Pseudorandom number generator seed. The seed may be either a positive
     31         unsigned 32-bit integer or, for arbitrary length seeds, an array-like
     32         object containing unsigned 32-bit integers.
     33 
     34     options.state: Uint32Array (optional)
     35         Pseudorandom number generator state. If provided, the `seed` option is
     36         ignored.
     37 
     38     options.copy: boolean (optional)
     39         Boolean indicating whether to copy a provided pseudorandom number
     40         generator state. Setting this option to `false` allows sharing state
     41         between two or more pseudorandom number generators. Setting this option
     42         to `true` ensures that a returned iterator has exclusive control over
     43         its internal state. Default: true.
     44 
     45     options.iter: integer (optional)
     46         Number of iterations.
     47 
     48     Returns
     49     -------
     50     iterator: Object
     51         Iterator.
     52 
     53     iterator.next(): Function
     54         Returns an iterator protocol-compliant object containing the next
     55         iterated value (if one exists) and a boolean flag indicating whether the
     56         iterator is finished.
     57 
     58     iterator.return( [value] ): Function
     59         Finishes an iterator and returns a provided value.
     60 
     61     iterator.PRNG: Function
     62         Underlying pseudorandom number generator.
     63 
     64     iterator.seed: Uint32Array|null
     65         Pseudorandom number generator seed.
     66 
     67     iterator.seedLength: integer|null
     68         Length of generator seed.
     69 
     70     iterator.state: Uint32Array|null
     71         Generator state.
     72 
     73     iterator.stateLength: integer|null
     74         Length of generator state.
     75 
     76     iterator.byteLength: integer|null
     77         Size (in bytes) of generator state.
     78 
     79     Examples
     80     --------
     81     > var it = {{alias}}( 1.0, 1.0 );
     82     > var r = it.next().value
     83     <number>
     84     > r = it.next().value
     85     <number>
     86 
     87     See Also
     88     --------
     89