Skip to content

Commit 7760d5a

Browse files
committed
Refactor random number generation in JS benchmarks
--- 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 77fd0d8 commit 7760d5a

File tree

5 files changed

+83
-85
lines changed

5 files changed

+83
-85
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
var bench = require( '@stdlib/bench' );
2424
var Float64Array = require( '@stdlib/array/float64' );
2525
var uniform = require( '@stdlib/random/base/uniform' );
26-
var uniformArray = require( '@stdlib/random/array/uniform' );
2726
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2827
var pkg = require( './../package.json' ).name;
2928
var mgf = require( './../lib' );
@@ -67,7 +66,7 @@ bench( pkg+':factory', function benchmark( b ) {
6766
var y;
6867
var i;
6968

70-
t = uniformArray( 100, 0.0, 10.0 );
69+
t = uniform( 0.0, 10.0 );
7170
mymgf = mgf.factory( 0.3 );
7271

7372
b.tic();

lib/node_modules/@stdlib/stats/base/dists/planck/mgf/include/stdlib/stats/base/dists/planck/mgf.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 moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` at a value `t`.
30+
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` .
3131
*/
3232
double stdlib_base_dists_planck_mgf( const double t, const double lambda );
3333

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var addon = require( './../src/addon.node' );
2626
// MAIN //
2727

2828
/**
29-
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` at a value `t`.
29+
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` .
3030
*
3131
* @private
3232
* @param {number} t - input value
Lines changed: 79 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +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/binary",
42+
"@stdlib/math/base/assert/is-nan",
43+
"@stdlib/math/base/special/expm1",
44+
"@stdlib/math/base/special/pow"
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/expm1",
61+
"@stdlib/math/base/special/pow"
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/binary",
42-
"@stdlib/math/base/assert/is-nan",
43-
"@stdlib/math/base/special/expm1",
44-
"@stdlib/math/base/special/pow"
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/constants/float64/eps",
60-
"@stdlib/math/base/assert/is-nan",
61-
"@stdlib/math/base/special/expm1",
62-
"@stdlib/math/base/special/pow"
63-
]
64-
},
65-
{
66-
"task": "examples",
67-
"wasm": false,
68-
"src": [
69-
"./src/main.c"
70-
],
71-
"include": [
72-
"./include"
73-
],
74-
"libraries": [],
75-
"libpath": [],
76-
"dependencies": [
77-
"@stdlib/math/base/assert/is-nan",
78-
"@stdlib/math/base/special/expm1",
79-
"@stdlib/math/base/special/pow"
80-
]
81-
}
82-
]
83-
}
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/expm1",
78+
"@stdlib/math/base/special/pow"
79+
]
80+
}
81+
]
82+
}

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

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

2323
/**
24-
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` at a value `t`.
24+
* Evaluates the moment-generating function (MGF) for a Planck distribution with shape parameter `lambda` .
2525
*
2626
* @param t input value
2727
* @param lambda shape parameter (must be positive)

0 commit comments

Comments
 (0)