Skip to content

Commit b8bbf88

Browse files
committed
refactor: added include in main.c and fixed the JS benchmark number generation
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - 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 --- --- 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: passed - 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 8b42e1c commit b8bbf88

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Diff for: lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/benchmark.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
var bench = require( '@stdlib/bench' );
2424
var randu = require( '@stdlib/random/base/randu' );
25+
var uniform = require( '@stdlib/random/base/uniform' );
2526
var ceil = require( '@stdlib/math/base/special/ceil' );
2627
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2728
var pkg = require( './../package.json' ).name;
@@ -39,7 +40,7 @@ bench( pkg, function benchmark( b ) {
3940

4041
b.tic();
4142
for ( i = 0; i < b.iterations; i++ ) {
42-
N = ceil( randu()*100.0 ) + 20.0;
43+
N = ceil( uniform( 20.0, 100.0 ) );
4344
K = ceil( randu()*(N-1) );
4445
n = ceil( randu()*(N-1) );
4546
y = kurtosis( N, K, n );

Diff for: lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/benchmark.native.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
2626
var randu = require( '@stdlib/random/base/randu' );
27+
var uniform = require( '@stdlib/random/base/uniform' );
2728
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2829
var tryRequire = require( '@stdlib/utils/try-require' );
2930
var round = require( '@stdlib/math/base/special/round' );
@@ -53,7 +54,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5354
K = new Float64Array( len );
5455
n = new Float64Array( len );
5556
for ( i = 0; i < len; i++ ) {
56-
N[ i ] = round( ( randu() * 90.0 ) + 10.0 );
57+
N[ i ] = round( uniform( 20.0, 100.0 ) );
5758
K[ i ] = round( randu() * N[ i ] );
5859
n[ i ] = round( randu() * N[ i ] );
5960
}

Diff for: lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/src/main.c

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "stdlib/constants/float64/pinf.h"
2020
#include "stdlib/math/base/assert/is_nonnegative_integer.h"
21+
#include "stdlib/stats/base/dists/hypergeometric/kurtosis.h"
2122

2223
/**
2324
* Returns the excess kurtosis of a hypergeometric distribution.

0 commit comments

Comments
 (0)