From ebacbc5af79adb08ff29aede75bbe0adfffc1fe7 Mon Sep 17 00:00:00 2001 From: Pranav Agrawal Date: Sun, 9 Feb 2025 18:13:55 +0530 Subject: [PATCH] bench: chore: address commit comments (commit 28b78a0) --- 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: na - 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 --- --- .../dists/poisson/ctor/benchmark/benchmark.js | 38 +++++++++---------- .../poisson/entropy/benchmark/benchmark.js | 2 +- .../poisson/kurtosis/benchmark/benchmark.js | 2 +- .../dists/poisson/mode/benchmark/benchmark.js | 2 +- .../poisson/quantile/benchmark/benchmark.js | 2 +- .../poisson/skewness/benchmark/benchmark.js | 2 +- .../poisson/stdev/benchmark/benchmark.js | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/ctor/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/ctor/benchmark/benchmark.js index c35eb7c597bf..f98e64d7f409 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/ctor/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/ctor/benchmark/benchmark.js @@ -38,7 +38,7 @@ bench( pkg+'::instantiation', function benchmark( b ) { var len; var i; - len=100; + len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { lambda[ i ] = ( uniform( EPS, 10.0 )); @@ -90,7 +90,7 @@ bench( pkg+'::set:lambda', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; y = new Float64Array( len ); for ( i = 0; i < len; i++ ) { y[ i ] = uniform( EPS, 10.0 ); @@ -120,7 +120,7 @@ bench( pkg+':entropy', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( EPS, 10.0 ); @@ -151,7 +151,7 @@ bench( pkg+':kurtosis', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( EPS + 1.0, 11.0 ); @@ -182,7 +182,7 @@ bench( pkg+':mean', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( EPS, 10.0 ); @@ -213,7 +213,7 @@ bench( pkg+':median', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( EPS, 10.0 ); @@ -244,7 +244,7 @@ bench( pkg+':mode', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 1.0 + EPS, 11.0 ); @@ -275,7 +275,7 @@ bench( pkg+':skewness', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 1.0 + EPS, 11.0 ); @@ -306,7 +306,7 @@ bench( pkg+':stdev', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 1.0 + EPS, 11.0 ); @@ -337,7 +337,7 @@ bench( pkg+':variance', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 1.0 + EPS, 11.0 ); @@ -368,7 +368,7 @@ bench( pkg+':cdf', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 0.0, 60.0 ); @@ -398,14 +398,14 @@ bench( pkg+':logpmf', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= discreteUniform( 0.0, 6.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = dist.logpmf( x[ i % len] ); + y = dist.logpmf( x[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -428,14 +428,14 @@ bench( pkg+':mgf', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 0.0, 1.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = dist.mgf( x[ i % len] ); + y = dist.mgf( x[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -458,14 +458,14 @@ bench( pkg+':pmf', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= discreteUniform( 0.0, 8.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = dist.pmf( x[ i % len] ); + y = dist.pmf( x[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -488,14 +488,14 @@ bench( pkg+':quantile', function benchmark( b ) { lambda = 5.54; dist = new Poisson( lambda ); - len=100; + len = 100; x = new Float64Array( len ); for ( i = 0; i < len; i++ ) { x[ i ]= uniform( 0.0, 1.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = dist.quantile( x[ i % len] ); + y = dist.quantile( x[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/entropy/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/entropy/benchmark/benchmark.js index 18501c82185b..e15fe9a62d96 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/entropy/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/entropy/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - lambda[ i ] = ( uniform( EPS, 20.0 )); + lambda[ i ] = uniform( EPS, 20.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/kurtosis/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/kurtosis/benchmark/benchmark.js index 526d17d1291a..c772a02fdfaf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/kurtosis/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/kurtosis/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - lambda[ i ] = ( uniform( EPS, 20.0 )); + lambda[ i ] = uniform( EPS, 20.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/mode/benchmark/benchmark.js index dec823b4947f..8ae90a298722 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/mode/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/mode/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - lambda[ i ] = ( uniform( EPS, 20.0 )); + lambda[ i ] = uniform( EPS, 20.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/quantile/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/quantile/benchmark/benchmark.js index 88c99ad7a7a3..f1e5e2976100 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/quantile/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/quantile/benchmark/benchmark.js @@ -76,7 +76,7 @@ bench( pkg+':factory', function benchmark( b ) { } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - y = myquantile( p[ i % len] ); + y = myquantile( p[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/skewness/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/skewness/benchmark/benchmark.js index c759d73bc0c9..f3350fe2c8a0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/skewness/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/skewness/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - lambda[ i ] = ( uniform( EPS, 20.0 )); + lambda[ i ] = uniform( EPS, 20.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) { diff --git a/lib/node_modules/@stdlib/stats/base/dists/poisson/stdev/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/poisson/stdev/benchmark/benchmark.js index 406da9ba28ac..1f300b05686f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/poisson/stdev/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/poisson/stdev/benchmark/benchmark.js @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) { len = 100; lambda = new Float64Array( len ); for ( i = 0; i < len; i++ ) { - lambda[ i ] = ( uniform( EPS, 20.0 )); + lambda[ i ] = uniform( EPS, 20.0 ); } b.tic(); for ( i = 0; i < b.iterations; i++ ) {