Skip to content

Commit 99288f7

Browse files
committed
docs: update descriptions to be more neutral regarding output values
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 393c150 commit 99288f7

File tree

5 files changed

+43
-44
lines changed

5 files changed

+43
-44
lines changed

lib/node_modules/@stdlib/random/tools/unary-factory/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# createFactory
2222

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.
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

@@ -42,7 +42,7 @@ var createFactory = require( '@stdlib/random/tools/unary-factory' );
4242

4343
#### createFactory( prng, idtypes odtypes, policies\[, options] )
4444

45-
Returns a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
45+
Returns a function for generating pseudorandom values drawn from a unary PRNG.
4646

4747
```javascript
4848
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -63,9 +63,9 @@ var factory = createFactory( exponential, idt, odt, policies, options );
6363

6464
The function has the following parameters:
6565

66-
- **prng**: unary pseudorandom number generator. Must have the following methods:
66+
- **prng**: unary pseudorandom value generator. Must have the following methods:
6767

68-
- **factory**: method which returns a new unary pseudorandom number generator.
68+
- **factory**: method which returns a new unary pseudorandom value generator.
6969

7070
- **idtypes**: list of supported input data types.
7171

@@ -79,11 +79,11 @@ The function has the following parameters:
7979

8080
The function supports the following options:
8181

82-
- **order**: default memory layout [order][@stdlib/ndarray/orders].
82+
- **order**: default [memory layout][@stdlib/ndarray/orders].
8383

8484
#### factory( \[options] )
8585

86-
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.
8787

8888
```javascript
8989
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -108,13 +108,13 @@ var random = factory();
108108
The function supports the following options:
109109

110110
- **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`.
114114

115115
#### random( shape, param1\[, options] )
116116

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.
118118

119119
```javascript
120120
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -142,7 +142,7 @@ var v = random( [ 2, 2 ], 2.0 );
142142
The function has the following parameters:
143143

144144
- **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.
146146
- **options**: function options (_optional_).
147147

148148
The function accepts the following options:
@@ -186,7 +186,7 @@ var dt = getDType( v );
186186

187187
#### random.assign( param1, out )
188188

189-
Fills an ndarray with pseudorandom numbers drawn from a probability distribution.
189+
Fills an ndarray with pseudorandom values drawn from a unary PRNG.
190190

191191
```javascript
192192
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -218,7 +218,7 @@ var bool = ( v === out );
218218

219219
The method has the following parameters:
220220

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.
222222
- **out**: output ndarray.
223223

224224
#### random.PRNG
@@ -250,7 +250,7 @@ var prng = random.PRNG;
250250

251251
#### random.seed
252252

253-
The value used to seed the underlying pseudorandom number generator.
253+
The value used to seed the underlying pseudorandom value generator.
254254

255255
```javascript
256256
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -305,7 +305,7 @@ var seed = random.seed;
305305

306306
#### random.seedLength
307307

308-
Length of the underlying pseudorandom number generator seed.
308+
Length of the underlying pseudorandom value generator seed.
309309

310310
```javascript
311311
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -360,7 +360,7 @@ var len = random.seedLength;
360360

361361
#### random.state
362362

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.
364364

365365
```javascript
366366
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -415,7 +415,7 @@ var state = random.state;
415415

416416
#### random.stateLength
417417

418-
Length of the underlying pseudorandom number generator state.
418+
Length of the underlying pseudorandom value generator state.
419419

420420
```javascript
421421
var dtypes = require( '@stdlib/ndarray/dtypes' );
@@ -470,7 +470,7 @@ var len = random.stateLength;
470470

471471
#### random.byteLength
472472

473-
Size (in bytes) of underlying pseudorandom number generator state.
473+
Size (in bytes) of underlying pseudorandom value generator state.
474474

475475
```javascript
476476
var dtypes = require( '@stdlib/ndarray/dtypes' );

lib/node_modules/@stdlib/random/tools/unary-factory/docs/repl.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
{{alias}}( prng, idtypes, odtypes, policies[, options] )
3-
Returns a function for generating pseudorandom numbers drawn from single-
4-
parameter probability distribution.
3+
Returns a function for generating pseudorandom values drawn from a unary
4+
PRNG.
55

66
Parameters
77
----------
88
prng: Function
9-
Unary pseudorandom number generator. Must have the following methods:
9+
Unary pseudorandom value generator. Must have the following methods:
1010

11-
- factory: returns a new unary pseudorandom number generator.
11+
- factory: returns a new unary pseudorandom value generator.
1212

1313
idtypes: Array<string>
1414
List of supported input data types.
@@ -30,9 +30,8 @@
3030
Returns
3131
-------
3232
fcn: Function
33-
Factory function for generating pseudorandom numbers drawn from single-
34-
parameter probability distribution. The function accepts a single
35-
optional argument:
33+
Factory function for generating pseudorandom values drawn from a unary
34+
PRNG. The function accepts a single optional argument:
3635

3736
- options: function options.
3837

lib/node_modules/@stdlib/random/tools/unary-factory/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
/**
22-
* Create a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
22+
* Create a function for generating pseudorandom values drawn from a unary PRNG.
2323
*
2424
* @module @stdlib/random/tools/unary-factory
2525
*

lib/node_modules/@stdlib/random/tools/unary-factory/lib/main.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ var format = require( '@stdlib/string/format' );
4242
// MAIN //
4343

4444
/**
45-
* Returns a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
45+
* Returns a function for generating pseudorandom values drawn from a unary PRNG.
4646
*
47-
* @param {Function} prng - unary pseudorandom number generator
48-
* @param {Function} prng.factory - method which returns a new unary pseudorandom number generator
47+
* @param {Function} prng - unary pseudorandom value generator
48+
* @param {Function} prng.factory - method which returns a new unary pseudorandom value generator
4949
* @param {StringArray} idtypes - list of supported input data types
5050
* @param {StringArray} odtypes - list of supported output data types
5151
* @param {Object} policies - policies
@@ -152,14 +152,14 @@ function createFactory( prng, idtypes, odtypes, policies, options ) {
152152
return factory;
153153

154154
/**
155-
* Returns a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.
155+
* Returns a function for generating pseudorandom values drawn from a unary PRNG.
156156
*
157157
* @private
158158
* @param {Options} [options] - function options
159159
* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
160-
* @param {*} [options.seed] - pseudorandom number generator seed
161-
* @param {*} [options.state] - pseudorandom number generator state
162-
* @param {boolean} [options.copy] - boolean indicating whether to copy a provided pseudorandom number generator state
160+
* @param {*} [options.seed] - pseudorandom value generator seed
161+
* @param {*} [options.state] - pseudorandom value generator state
162+
* @param {boolean} [options.copy] - boolean indicating whether to copy a provided pseudorandom value generator state
163163
* @throws {TypeError} options argument must be an object
164164
* @throws {TypeError} must provide valid options
165165
* @throws {Error} must provide a valid state
@@ -196,20 +196,20 @@ function createFactory( prng, idtypes, odtypes, policies, options ) {
196196
return rand;
197197

198198
/**
199-
* Returns an ndarray filled with pseudorandom numbers drawn from a single-parameter probability distribution.
199+
* Returns an ndarray filled with pseudorandom values drawn from a unary PRNG.
200200
*
201201
* @private
202202
* @param {NonNegativeIntegerArray} shape - output ndarray shape
203-
* @param {(number|ComplexLike|ndarrayLike)} param1 - distribution parameter
203+
* @param {(ndarrayLike|*)} param1 - PRNG parameter
204204
* @param {Options} [options] - function options
205205
* @param {string} [options.dtype] - output data type
206206
* @param {string} [options.order] - memory layout (either row-major or column-major)
207207
* @param {string} [options.mode] - specifies how to handle indices which exceed ndarray dimensions
208208
* @param {StringArray} [options.submode] - specifies how to handle subscripts which exceed ndarray dimensions on a per dimension basis
209209
* @param {boolean} [options.readonly] - boolean indicating whether an ndarray should be read-only
210210
* @throws {TypeError} first argument must be a valid shape
211-
* @throws {TypeError} must provide valid distribution parameters
212-
* @throws {TypeError} distribution parameters and the desired shape must be broadcast compatible
211+
* @throws {TypeError} must provide valid PRNG parameters
212+
* @throws {TypeError} PRNG parameters and the desired shape must be broadcast compatible
213213
* @throws {TypeError} options argument must be an object
214214
* @throws {TypeError} must provide valid options
215215
* @returns {ndarray} output array
@@ -222,14 +222,14 @@ function createFactory( prng, idtypes, odtypes, policies, options ) {
222222
}
223223

224224
/**
225-
* Fills an ndarray with pseudorandom numbers drawn from a single-parameter probability distribution.
225+
* Fills an ndarray with pseudorandom values drawn from a unary PRNG.
226226
*
227227
* @private
228-
* @param {(number|ComplexLike|ndarrayLike)} param1 - distribution parameter
228+
* @param {(ndarrayLike|*)} param1 - PRNG parameter
229229
* @param {ndarrayLike} out - output ndarray
230230
* @throws {TypeError} second argument must be an ndarray
231-
* @throws {TypeError} must provide valid distribution parameters
232-
* @throws {TypeError} distribution parameters and the output ndarray must be broadcast compatible
231+
* @throws {TypeError} must provide valid PRNG parameters
232+
* @throws {TypeError} PRNG parameters and the output ndarray must be broadcast compatible
233233
* @returns {ndarray} output ndarray
234234
*/
235235
function assign( param1, out ) {
@@ -277,7 +277,7 @@ function createFactory( prng, idtypes, odtypes, policies, options ) {
277277
}
278278

279279
/**
280-
* Returns the current pseudorandom number generator state.
280+
* Returns the current pseudorandom value generator state.
281281
*
282282
* @private
283283
* @returns {*} current state
@@ -287,7 +287,7 @@ function createFactory( prng, idtypes, odtypes, policies, options ) {
287287
}
288288

289289
/**
290-
* Sets the pseudorandom number generator state.
290+
* Sets the pseudorandom value generator state.
291291
*
292292
* @private
293293
* @param {*} s - generator state

lib/node_modules/@stdlib/random/tools/unary-factory/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/random/tools/unary-factory",
33
"version": "0.0.0",
4-
"description": "Create a function for generating pseudorandom numbers drawn from a single-parameter probability distribution.",
4+
"description": "Create a function for generating pseudorandom values drawn from a unary PRNG.",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

0 commit comments

Comments
 (0)