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