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