Skip to content

Commit 06cc693

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 aebf8f8 commit 06cc693

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/skewness/benchmark/benchmark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24+
var uniform = require( '@stdlib/random/base/uniform' );
2425
var randu = require( '@stdlib/random/base/randu' );
2526
var ceil = require( '@stdlib/math/base/special/ceil' );
2627
var isnan = require( '@stdlib/math/base/assert/is-nan' );
@@ -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 ) + 10;
43+
N = ceil( uniform( 10.0, 100.0 ) );
4344
K = ceil( randu()*(N-1) );
4445
n = ceil( randu()*(N-1) );
4546
y = skewness( N, K, n );

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/skewness/benchmark/benchmark.native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var Float64Array = require( '@stdlib/array/float64' );
26+
var uniform = require( '@stdlib/random/base/uniform' );
2627
var randu = require( '@stdlib/random/base/randu' );
2728
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2829
var tryRequire = require( '@stdlib/utils/try-require' );
@@ -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( 10.0, 100.0 ) );
5758
K[ i ] = round( randu() * N[ i ] );
5859
n[ i ] = round( randu() * N[ i ] );
5960
}

lib/node_modules/@stdlib/stats/base/dists/hypergeometric/skewness/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "stdlib/constants/float64/pinf.h"
2020
#include "stdlib/math/base/assert/is_nonnegative_integer.h"
2121
#include "stdlib/math/base/special/sqrt.h"
22+
#include "stdlib/stats/base/dists/hypergeometric/skewness.h"
2223

2324
/**
2425
* Returns the skewness of a hypergeometric distribution.

0 commit comments

Comments
 (0)