Skip to content

Commit 8fd4849

Browse files
committed
Document properties and options
1 parent d50180a commit 8fd4849

File tree

1 file changed

+70
-2
lines changed
  • lib/node_modules/@stdlib/random/base/hypergeometric/docs

1 file changed

+70
-2
lines changed

lib/node_modules/@stdlib/random/base/hypergeometric/docs/repl.txt

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,21 @@
5252
options: Object (optional)
5353
Options.
5454

55-
options.seed: any (optional)
56-
Pseudorandom number generator seed.
55+
options.seed: integer|ArrayLikeObject<integer> (optional)
56+
Pseudorandom number generator seed. The seed may be either a positive
57+
unsigned 32-bit integer or, for arbitrary length seeds, an array-like
58+
object containing unsigned 32-bit integers.
59+
60+
options.state: Uint32Array (optional)
61+
Pseudorandom number generator state. If provided, the `seed` option is
62+
ignored.
63+
64+
options.copy: boolean (optional)
65+
Boolean indicating whether to copy a provided pseudorandom number
66+
generator state. Setting this option to `false` allows sharing state
67+
between two or more pseudorandom number generators. Setting this option
68+
to `true` ensures that a returned generator has exclusive control over
69+
its internal state. Default: true.
5770

5871
Returns
5972
-------
@@ -97,6 +110,61 @@
97110
--------
98111
> var seed = {{alias}}.seed;
99112

113+
114+
{{alias}}.seedLength
115+
Length of generator seed.
116+
117+
Examples
118+
--------
119+
> var len = {{alias}}.seedLength;
120+
121+
122+
{{alias}}.state
123+
Generator state.
124+
125+
Examples
126+
--------
127+
> var r = {{alias}}( 20, 10, 15 )
128+
<number>
129+
> r = {{alias}}( 20, 10, 15 )
130+
<number>
131+
> r = {{alias}}( 20, 10, 15 )
132+
<number>
133+
134+
// Get a copy of the current state:
135+
> var state = {{alias}}.state
136+
<Uint32Array>
137+
138+
> r = {{alias}}( 20, 10, 15 )
139+
<number>
140+
> r = {{alias}}( 20, 10, 15 )
141+
<number>
142+
143+
// Set the state:
144+
> {{alias}}.state = state;
145+
146+
// Replay the last two pseudorandom numbers:
147+
> r = {{alias}}( 20, 10, 15 )
148+
<number>
149+
> r = {{alias}}( 20, 10, 15 )
150+
<number>
151+
152+
153+
{{alias}}.stateLength
154+
Length of generator state.
155+
156+
Examples
157+
--------
158+
> var len = {{alias}}.stateLength;
159+
160+
161+
{{alias}}.byteLength
162+
Size (in bytes) of generator state.
163+
164+
Examples
165+
--------
166+
> var sz = {{alias}}.byteLength;
167+
100168
See Also
101169
--------
102170

0 commit comments

Comments
 (0)