Skip to content

Commit 078df09

Browse files
committed
Document properties and options
1 parent 1b5f1a0 commit 078df09

File tree

1 file changed

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

1 file changed

+70
-2
lines changed

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

+70-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,21 @@
4646
options: Object (optional)
4747
Options.
4848

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

5265
Returns
5366
-------
@@ -91,6 +104,61 @@
91104
--------
92105
> var seed = {{alias}}.seed;
93106

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

0 commit comments

Comments
 (0)