Skip to content

Commit c60210c

Browse files
committed
refactor random number generation
--- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 083ee29 commit c60210c

File tree

6 files changed

+87
-90
lines changed

6 files changed

+87
-90
lines changed

lib/node_modules/@stdlib/stats/base/dists/planck/kurtosis/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ for ( i = 0; i < lambda.length; i++ ) {
148148

149149
#### stdlib_base_dists_planck_kurtosis( lambda)
150150

151-
Evaluates the kurtosis for an planck distribution.
151+
Evaluates the kurtosis for a Planck distribution with shape parameter `lambda`.
152152

153153
```c
154154
double out = stdlib_base_dists_planck_kurtosis( 0.1 );

lib/node_modules/@stdlib/stats/base/dists/planck/kurtosis/benchmark/benchmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var Float64Array = require( '@stdlib/array/float64' );
25-
var randu = require( '@stdlib/random/base/randu' );
25+
var uniform = require( '@stdlib/random/base/uniform' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
var pkg = require( './../package.json' ).name;
2828
var kurtosis = require( './../lib' );
@@ -39,7 +39,7 @@ bench( pkg, function benchmark( b ) {
3939
len= 100;
4040
lambda = new Float64Array( len );
4141
for ( i = 0; i < len; i++ ) {
42-
lambda[ i ] = ( randu() * 10.0 ) + 1.0;
42+
lambda[ i ] = uniform( 1.0, 10.0 );
4343
}
4444

4545
b.tic();

lib/node_modules/@stdlib/stats/base/dists/planck/kurtosis/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
26-
var randu = require( '@stdlib/random/base/randu' );
26+
var uniform = require( '@stdlib/random/base/uniform' );
2727
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
var tryRequire = require( '@stdlib/utils/try-require' );
2929
var pkg = require( './../package.json' ).name;
@@ -39,7 +39,7 @@ var opts = {
3939

4040
// MAIN //
4141

42-
bench( pkg+'::native', opts , function benchmark( b ) {
42+
bench( pkg+'::native', opts, function benchmark( b ) {
4343
var lambda;
4444
var len;
4545
var y;
@@ -49,7 +49,7 @@ bench( pkg+'::native', opts , function benchmark( b ) {
4949
lambda = new Float64Array( len );
5050

5151
for ( i = 0; i < len; i++ ) {
52-
lambda[ i ] = ( randu() * 10.0 ) + 1.0;
52+
lambda[ i ] = uniform( 1.0, 10.0 );
5353
}
5454

5555
b.tic();

lib/node_modules/@stdlib/stats/base/dists/planck/kurtosis/include/stdlib/stats/base/dists/planck/kurtosis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
/**
30-
* Evaluates the kurtosis for an planck distribution with shape parameter lambda (λ).
30+
* Evaluates the excess kurtosis for a Planck distribution with shape parameter `lambda`.
3131
*/
3232
double stdlib_base_dists_planck_kurtosis( const double lambda );
3333

Lines changed: 79 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,82 @@
11
{
2-
"options": {
2+
"options": {
3+
"task": "build",
4+
"wasm": false
5+
},
6+
"fields": [
7+
{
8+
"field": "src",
9+
"resolve": true,
10+
"relative": true
11+
},
12+
{
13+
"field": "include",
14+
"resolve": true,
15+
"relative": true
16+
},
17+
{
18+
"field": "libraries",
19+
"resolve": false,
20+
"relative": false
21+
},
22+
{
23+
"field": "libpath",
24+
"resolve": true,
25+
"relative": false
26+
}
27+
],
28+
"confs": [
29+
{
330
"task": "build",
4-
"wasm": false
31+
"wasm": false,
32+
"src": [
33+
"./src/main.c"
34+
],
35+
"include": [
36+
"./include"
37+
],
38+
"libraries": [],
39+
"libpath": [],
40+
"dependencies": [
41+
"@stdlib/math/base/napi/unary",
42+
"@stdlib/math/base/assert/is-nan",
43+
"@stdlib/math/base/special/cosh",
44+
"@stdlib/constants/float64/pi"
45+
]
46+
},
47+
{
48+
"task": "benchmark",
49+
"wasm": false,
50+
"src": [
51+
"./src/main.c"
52+
],
53+
"include": [
54+
"./include"
55+
],
56+
"libraries": [],
57+
"libpath": [],
58+
"dependencies": [
59+
"@stdlib/math/base/assert/is-nan",
60+
"@stdlib/math/base/special/cosh",
61+
"@stdlib/constants/float64/pi"
62+
]
563
},
6-
"fields": [
7-
{
8-
"field": "src",
9-
"resolve": true,
10-
"relative": true
11-
},
12-
{
13-
"field": "include",
14-
"resolve": true,
15-
"relative": true
16-
},
17-
{
18-
"field": "libraries",
19-
"resolve": false,
20-
"relative": false
21-
},
22-
{
23-
"field": "libpath",
24-
"resolve": true,
25-
"relative": false
26-
}
27-
],
28-
"confs": [
29-
{
30-
"task": "build",
31-
"wasm": false,
32-
"src": [
33-
"./src/main.c"
34-
],
35-
"include": [
36-
"./include"
37-
],
38-
"libraries": [],
39-
"libpath": [],
40-
"dependencies": [
41-
"@stdlib/math/base/napi/unary",
42-
"@stdlib/math/base/assert/is-nan",
43-
"@stdlib/math/base/special/cosh",
44-
"@stdlib/constants/float64/pi"
45-
46-
]
47-
},
48-
{
49-
"task": "benchmark",
50-
"wasm": false,
51-
"src": [
52-
"./src/main.c"
53-
],
54-
"include": [
55-
"./include"
56-
],
57-
"libraries": [],
58-
"libpath": [],
59-
"dependencies": [
60-
"@stdlib/math/base/assert/is-nan",
61-
"@stdlib/math/base/special/cosh",
62-
"@stdlib/constants/float64/pi"
63-
64-
]
65-
},
66-
{
67-
"task": "examples",
68-
"wasm": false,
69-
"src": [
70-
"./src/main.c"
71-
],
72-
"include": [
73-
"./include"
74-
],
75-
"libraries": [],
76-
"libpath": [],
77-
"dependencies": [
78-
"@stdlib/math/base/assert/is-nan",
79-
"@stdlib/math/base/special/cosh",
80-
"@stdlib/constants/float64/pi"
81-
82-
]
83-
}
84-
]
85-
}
64+
{
65+
"task": "examples",
66+
"wasm": false,
67+
"src": [
68+
"./src/main.c"
69+
],
70+
"include": [
71+
"./include"
72+
],
73+
"libraries": [],
74+
"libpath": [],
75+
"dependencies": [
76+
"@stdlib/math/base/assert/is-nan",
77+
"@stdlib/math/base/special/cosh",
78+
"@stdlib/constants/float64/pi"
79+
]
80+
}
81+
]
82+
}

lib/node_modules/@stdlib/stats/base/dists/planck/kurtosis/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "stdlib/math/base/special/cosh.h"
2121

2222
/**
23-
* Returns the excess kurtosis of a Planck distribution.
23+
* Evaluates the excess kurtosis for a Planck distribution with shape parameter `lambda`.
2424
*
2525
* @param lambda shape parameter
2626
* @return kurtosis

0 commit comments

Comments
 (0)