You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/random/tools/unary-factory/README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ limitations under the License.
20
20
21
21
# createFactory
22
22
23
-
> Create a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
23
+
> Create a function for generating pseudorandom values drawn from a unary PRNG.
24
24
25
25
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26
26
@@ -42,7 +42,7 @@ var createFactory = require( '@stdlib/random/tools/unary-factory' );
Returns a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
86
+
Returns a function for generating pseudorandom values drawn from a unary PRNG.
87
87
88
88
```javascript
89
89
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -108,13 +108,13 @@ var random = factory();
108
108
The function supports the following options:
109
109
110
110
-**prng**: pseudorandom number generator for generating uniformly distributed pseudorandom numbers on the interval `[0,1)`. If provided, the function **ignores** both the `state` and `seed` options. In order to seed the underlying pseudorandom number generator, one must seed the provided `prng` (assuming the provided `prng` is seedable).
111
-
-**seed**: pseudorandom number generator seed.
112
-
-**state**: a [`Uint32Array`][@stdlib/array/uint32] containing pseudorandom number generator state. If provided, the function ignores the `seed` option.
113
-
-**copy**: boolean indicating whether to copy a provided pseudorandom number generator state. Setting this option to `false` allows sharing state between two or more pseudorandom number generators. Setting this option to `true` ensures that an underlying generator has exclusive control over its internal state. Default: `true`.
111
+
-**seed**: pseudorandom value generator seed.
112
+
-**state**: a [`Uint32Array`][@stdlib/array/uint32] containing pseudorandom value generator state. If provided, the function ignores the `seed` option.
113
+
-**copy**: boolean indicating whether to copy a provided pseudorandom value generator state. Setting this option to `false` allows sharing state between two or more pseudorandom value generators. Setting this option to `true` ensures that an underlying generator has exclusive control over its internal state. Default: `true`.
114
114
115
115
#### random( shape, param1\[, options] )
116
116
117
-
Returns an ndarray filled with pseudorandom numbers drawn from a probability distribution.
117
+
Returns an ndarray filled with pseudorandom values drawn from a unary PRNG.
118
118
119
119
```javascript
120
120
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -142,7 +142,7 @@ var v = random( [ 2, 2 ], 2.0 );
142
142
The function has the following parameters:
143
143
144
144
-**shape**: output ndarray shape.
145
-
-**param1**: distribution parameter. May be either a scalar or an ndarray. If an ndarray, must be [broadcast compatible][@stdlib/ndarray/base/broadcast-shapes] with the specified output ndarray shape.
145
+
-**param1**: PRNG parameter. May be either a scalar or an ndarray. If an ndarray, must be [broadcast compatible][@stdlib/ndarray/base/broadcast-shapes] with the specified output ndarray shape.
146
146
-**options**: function options (_optional_).
147
147
148
148
The function accepts the following options:
@@ -186,7 +186,7 @@ var dt = getDType( v );
186
186
187
187
#### random.assign( param1, out )
188
188
189
-
Fills an ndarray with pseudorandom numbers drawn from a probability distribution.
189
+
Fills an ndarray with pseudorandom values drawn from a unary PRNG.
190
190
191
191
```javascript
192
192
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -218,7 +218,7 @@ var bool = ( v === out );
218
218
219
219
The method has the following parameters:
220
220
221
-
-**param1**: distribution parameter. May be either a scalar or an ndarray. If an ndarray, must be [broadcast compatible][@stdlib/ndarray/base/broadcast-shapes] with the output ndarray.
221
+
-**param1**: PRNG parameter. May be either a scalar or an ndarray. If an ndarray, must be [broadcast compatible][@stdlib/ndarray/base/broadcast-shapes] with the output ndarray.
222
222
-**out**: output ndarray.
223
223
224
224
#### random.PRNG
@@ -250,7 +250,7 @@ var prng = random.PRNG;
250
250
251
251
#### random.seed
252
252
253
-
The value used to seed the underlying pseudorandom number generator.
253
+
The value used to seed the underlying pseudorandom value generator.
254
254
255
255
```javascript
256
256
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -305,7 +305,7 @@ var seed = random.seed;
305
305
306
306
#### random.seedLength
307
307
308
-
Length of the underlying pseudorandom number generator seed.
308
+
Length of the underlying pseudorandom value generator seed.
309
309
310
310
```javascript
311
311
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -360,7 +360,7 @@ var len = random.seedLength;
360
360
361
361
#### random.state
362
362
363
-
Writable property for getting and setting the underlying pseudorandom number generator state.
363
+
Writable property for getting and setting the underlying pseudorandom value generator state.
364
364
365
365
```javascript
366
366
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -415,7 +415,7 @@ var state = random.state;
415
415
416
416
#### random.stateLength
417
417
418
-
Length of the underlying pseudorandom number generator state.
418
+
Length of the underlying pseudorandom value generator state.
419
419
420
420
```javascript
421
421
var dtypes =require( '@stdlib/ndarray/dtypes' );
@@ -470,7 +470,7 @@ var len = random.stateLength;
470
470
471
471
#### random.byteLength
472
472
473
-
Size (in bytes) of underlying pseudorandom number generator state.
473
+
Size (in bytes) of underlying pseudorandom value generator state.
0 commit comments