From cc32a344ed92962e2168da1f961748f934238cf8 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Sun, 19 Jan 2025 22:29:01 -0500 Subject: [PATCH] chore: minor clean-up --- 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: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - 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: passed - 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 --- --- lib/node_modules/@stdlib/stats/base/dists/beta/mean/README.md | 4 ++-- .../stats/base/dists/beta/mean/benchmark/c/benchmark.c | 4 ++-- .../@stdlib/stats/base/dists/beta/mean/test/test.js | 2 +- .../@stdlib/stats/base/dists/beta/mean/test/test.native.js | 2 +- .../stats/base/dists/discrete-uniform/skewness/lib/native.js | 1 + .../@stdlib/stats/base/dists/kumaraswamy/logcdf/lib/native.js | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/README.md b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/README.md index ea03ac0bfaa1..0db0320bdcef 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/README.md @@ -185,7 +185,7 @@ The function accepts the following arguments: - **beta**: `[in] double` second shape parameter. ```c -double stdlib_base_dists_beta_mean( const double a, const double b ); +double stdlib_base_dists_beta_mean( const double alpha, const double beta ); ``` @@ -222,7 +222,7 @@ int main( void ) { double beta; double y; int i; - + for ( i = 0; i < 25; i++ ) { alpha = random_uniform( 0.0, 10.0 ); beta = random_uniform( 0.0, 10.0 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/benchmark/c/benchmark.c index e3edbbc4c3a1..b897091c5782 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/benchmark/c/benchmark.c @@ -101,8 +101,8 @@ static double benchmark( void ) { int i; for ( i = 0; i < 100; i++ ) { - alpha[ i ] = random_uniform( -20.0, 0.0 ); - beta[ i ] = random_uniform( alpha[ i ], alpha[ i ]+40.0 ); + alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); } t = tic(); diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.js index 24f2f4625c0f..bdd0befe7b0b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.js @@ -112,7 +112,7 @@ tape( 'the function returns the mean of a beta distribution', function test( t ) t.equal( y, expected[i], 'alpha: '+alpha[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); - tol = 15.0 * EPS * abs( expected[ i ] ); + tol = 1.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. alpha: '+alpha[i]+'. beta: '+beta[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); } } diff --git a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.native.js index 77f0e8be87bd..57625311b7c0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/beta/mean/test/test.native.js @@ -121,7 +121,7 @@ tape( 'the function returns the mean of a beta distribution', opts, function tes t.equal( y, expected[i], 'alpha: '+alpha[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] ); } else { delta = abs( y - expected[ i ] ); - tol = 15.0 * EPS * abs( expected[ i ] ); + tol = 1.0 * EPS * abs( expected[ i ] ); t.ok( delta <= tol, 'within tolerance. alpha: '+alpha[i]+'. beta: '+beta[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' ); } } diff --git a/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/skewness/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/skewness/lib/native.js index 9b655da27da4..e24ea007bc8d 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/skewness/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/discrete-uniform/skewness/lib/native.js @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' ); /** * Returns the skewness of a discrete uniform distribution. * +* @private * @param {integer} a - minimum support * @param {integer} b - maximum support * @returns {number} skewness diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/lib/native.js b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/lib/native.js index 8a8c86c86caf..300f11502f4f 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/lib/native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/lib/native.js @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' ); /** * Evaluates the natural logarithm of the cumulative density function (CDF) for a uniform distribution with minimum support `a` and maximum support `b` at a value `x`. * +* @private * @param {number} x - input value * @param {PositiveNumber} a - first shape parameter * @param {PositiveNumber} b - second shape parameter