Skip to content

Commit 8805742

Browse files
chore: resolve lint errors in random/base/minstd
PR-URL: #6498 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]>
1 parent 5df078f commit 8805742

File tree

4 files changed

+41
-43
lines changed

4 files changed

+41
-43
lines changed

lib/node_modules/@stdlib/random/base/minstd/docs/types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ import minstd = require( './index' );
8686
minstd.factory( { 'state': null } ); // $ExpectError
8787
minstd.factory( { 'state': [] } ); // $ExpectError
8888
minstd.factory( { 'state': {} } ); // $ExpectError
89-
minstd.factory( { 'state': true ); // $ExpectError
89+
minstd.factory( { 'state': true } ); // $ExpectError
9090
minstd.factory( { 'state': ( x: number ): number => x } ); // $ExpectError
9191
}
9292

lib/node_modules/@stdlib/random/base/minstd/lib/main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,15 @@ var randint32 = require( './rand_int32.js' );
7575
*
7676
* The values for \\( a \\), \\( c \\), and \\( m \\) are taken from Park and Miller, "Random Number Generators: Good Ones Are Hard To Find". Park's and Miller's article is also the basis for a recipe in the second edition of _Numerical Recipes in C_.
7777
*
78-
*
7978
* ## Notes
8079
*
8180
* - The generator has a period of approximately \\(2.1\mbox{e}9\\) (see [Numerical Recipes in C, 2nd Edition](#references), p. 279).
8281
*
83-
*
8482
* ## References
8583
*
8684
* - Park, S. K., and K. W. Miller. 1988. "Random Number Generators: Good Ones Are Hard to Find." _Communications of the ACM_ 31 (10). New York, NY, USA: ACM: 1192–1201. doi:[10.1145/63039.63042](http://dx.doi.org/10.1145/63039.63042).
8785
* - Press, William H., Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 1992. _Numerical Recipes in C: The Art of Scientific Computing, Second Edition_. Cambridge University Press.
8886
*
89-
*
9087
* @function minstd
9188
* @type {PRNG}
9289
* @returns {PositiveInteger} pseudorandom integer
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
{
2-
"options": {},
3-
"fields": [
4-
{
5-
"field": "src",
6-
"resolve": true,
7-
"relative": true
8-
},
9-
{
10-
"field": "include",
11-
"resolve": true,
12-
"relative": true
13-
},
14-
{
15-
"field": "libraries",
16-
"resolve": false,
17-
"relative": false
18-
},
19-
{
20-
"field": "libpath",
21-
"resolve": true,
22-
"relative": false
23-
}
24-
],
25-
"confs": [
26-
{
27-
"src": [
28-
"./src/main.c"
29-
],
30-
"include": [
31-
"./include"
32-
],
33-
"libraries": [],
34-
"libpath": [],
35-
"dependencies": [
36-
"@stdlib/random/base/shared"
37-
]
38-
}
39-
]
2+
"options": {},
3+
"fields": [
4+
{
5+
"field": "src",
6+
"resolve": true,
7+
"relative": true
8+
},
9+
{
10+
"field": "include",
11+
"resolve": true,
12+
"relative": true
13+
},
14+
{
15+
"field": "libraries",
16+
"resolve": false,
17+
"relative": false
18+
},
19+
{
20+
"field": "libpath",
21+
"resolve": true,
22+
"relative": false
23+
}
24+
],
25+
"confs": [
26+
{
27+
"src": [
28+
"./src/main.c"
29+
],
30+
"include": [
31+
"./include"
32+
],
33+
"libraries": [],
34+
"libpath": [],
35+
"dependencies": [
36+
"@stdlib/random/base/shared"
37+
]
38+
}
39+
]
4040
}

lib/node_modules/@stdlib/random/base/minstd/test/test.factory.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var Int32Array = require( '@stdlib/array/int32' );
3232
var kstest = require( '@stdlib/stats/kstest' );
3333
var gcopy = require( '@stdlib/blas/base/gcopy' );
3434
var typedarray2json = require( '@stdlib/array/to-json' );
35+
var zeros = require( '@stdlib/array/base/zeros' );
3536
var factory = require( './../lib/factory.js' );
3637

3738

@@ -1094,7 +1095,7 @@ tape( 'the `normalized` method returns pseudorandom numbers drawn from a uniform
10941095

10951096
threshold = 0.10;
10961097

1097-
x = new Array( 1e3 );
1098+
x = zeros( 1e3 );
10981099
N = 500;
10991100

11001101
count = -1;

0 commit comments

Comments
 (0)