Skip to content

Commit 441ea68

Browse files
committed
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: passed - task: lint_c_examples status: passed - 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 ---
1 parent b7c97a5 commit 441ea68

File tree

11 files changed

+14
-36
lines changed

11 files changed

+14
-36
lines changed

lib/node_modules/@stdlib/stats/base/dists/gumbel/mode/test/test.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@
2222

2323
var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25-
var abs = require( '@stdlib/math/base/special/abs' );
2625
var PINF = require( '@stdlib/constants/float64/pinf' );
2726
var NINF = require( '@stdlib/constants/float64/ninf' );
28-
var EPS = require( '@stdlib/constants/float64/eps' );
2927
var mode = require( './../lib' );
3028

3129

@@ -79,9 +77,7 @@ tape( 'if provided a nonpositive `beta`, the function returns `NaN`', function t
7977

8078
tape( 'the function returns the mode of a Gumbel distribution', function test( t ) {
8179
var expected;
82-
var delta;
8380
var beta;
84-
var tol;
8581
var mu;
8682
var y;
8783
var i;
@@ -92,13 +88,7 @@ tape( 'the function returns the mode of a Gumbel distribution', function test( t
9288
for ( i = 0; i < mu.length; i++ ) {
9389
y = mode( mu[i], beta[i] );
9490
if ( expected[i] !== null ) {
95-
if ( y === expected[i] ) {
96-
t.equal( y, expected[i], 'mu:'+mu[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] );
97-
} else {
98-
delta = abs( y - expected[ i ] );
99-
tol = 2.0 * EPS * abs( expected[ i ] );
100-
t.ok( delta <= tol, 'within tolerance. mu: '+mu[i]+'. beta: '+beta[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
101-
}
91+
t.equal( y, expected[i], 'mu:'+mu[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] );
10292
}
10393
}
10494
t.end();

lib/node_modules/@stdlib/stats/base/dists/gumbel/mode/test/test.native.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
2525
var tryRequire = require( '@stdlib/utils/try-require' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
27-
var abs = require( '@stdlib/math/base/special/abs' );
2827
var PINF = require( '@stdlib/constants/float64/pinf' );
2928
var NINF = require( '@stdlib/constants/float64/ninf' );
30-
var EPS = require( '@stdlib/constants/float64/eps' );
3129

3230

3331
// FIXTURES //
@@ -88,9 +86,7 @@ tape( 'if provided a nonpositive `beta`, the function returns `NaN`', opts, func
8886

8987
tape( 'the function returns the mode of a Gumbel distribution', opts, function test( t ) {
9088
var expected;
91-
var delta;
9289
var beta;
93-
var tol;
9490
var mu;
9591
var y;
9692
var i;
@@ -101,13 +97,7 @@ tape( 'the function returns the mode of a Gumbel distribution', opts, function t
10197
for ( i = 0; i < mu.length; i++ ) {
10298
y = mode( mu[i], beta[i] );
10399
if ( expected[i] !== null) {
104-
if ( y === expected[i] ) {
105-
t.equal( y, expected[i], 'mu:'+mu[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] );
106-
} else {
107-
delta = abs( y - expected[ i ] );
108-
tol = 2.0 * EPS * abs( expected[ i ] );
109-
t.ok( delta <= tol, 'within tolerance. mu: '+mu[i]+'. beta: '+beta[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
110-
}
100+
t.equal( y, expected[i], 'mu:'+mu[i]+', beta: '+beta[i]+', y: '+y+', expected: '+expected[i] );
111101
}
112102
}
113103
t.end();

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ The function accepts the following arguments:
216216
- **b**: `[in] double` second shape parameter.
217217

218218
```c
219-
double stdlib_base_dists_kumaraswamy_logcdf( const double x, const
220-
double a, const double b );
219+
double stdlib_base_dists_kumaraswamy_logcdf( const double x, const double a, const double b );
221220
```
222221
223222
</section>

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logcdf/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "stdlib/constants/float64/ninf.h"
2424

2525
/**
26-
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for an arcsine distribution with minimum support `a` and maximum support `b` at a value `x`.
26+
* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a Kumaraswamy's double bounded distribution with first shape parameter `a` and second shape parameter `b` at a value `x`.
2727
*
2828
* @param x input value
2929
* @param a first shape parameter

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ y = logpdf( 1.0, 0.0, -1.0, 0.5 );
102102

103103
#### logpdf.factory( a, b, c )
104104

105-
Returns a function for evaluating the natural logarithm of the [probability density function][pdf] (PDF) of a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit) and `c` (mode).
105+
Returns a function for evaluating the natural logarithm of the [probability density function][pdf] (PDF) of a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit), and `c` (mode).
106106

107107
```javascript
108108
var mylogpdf = logpdf.factory( 0.0, 10.0, 5.0 );
@@ -190,7 +190,7 @@ for ( i = 0; i < 25; i++ ) {
190190

191191
#### stdlib_base_dists_triangular_logpdf( x, a, b, c )
192192

193-
Evaluates the natural logarithm of the [probability density function][pdf] (PDF) for a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit) and `c` (mode).
193+
Evaluates the natural logarithm of the [probability density function][pdf] (PDF) for a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit), and `c` (mode).
194194

195195
```c
196196
double y = stdlib_base_dists_triangular_logpdf( 0.5, -1.0, 1.0, 0.0 );
@@ -250,7 +250,7 @@ int main( void ) {
250250
x = random_uniform( 0.0, 30.0 );
251251
a = random_uniform( 0.0, 10.0 );
252252
b = random_uniform( a + STDLIB_CONSTANT_FLOAT64_EPS, 40.0 );
253-
c = a + random_uniform( 0.0, b - a );
253+
c = random_uniform( a, b );
254254
y = stdlib_base_dists_triangular_logpdf( x, a, b, c );
255255
printf( "x: %lf, a: %lf, b: %lf, c: %lf, ln(f(x;a,b,c)): %lf\n", x, a, b, c, y );
256256
}

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static double benchmark( void ) {
106106
x[ i ] = random_uniform( 0.0, 30.0 );
107107
a[ i ] = random_uniform( 0.0, 10.0 );
108108
b[ i ] = random_uniform( a[ i ] + STDLIB_CONSTANT_FLOAT64_EPS, 40.0 );
109-
c[ i ] = a[ i ] + random_uniform( 0.0, b[ i ] - a[ i ] );
109+
c[ i ] = random_uniform( a[ i ], b[ i ] );
110110
}
111111

112112
t = tic();

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ int main( void ) {
3838
for ( i = 0; i < 25; i++ ) {
3939
x = random_uniform( 0.0, 30.0 );
4040
a = random_uniform( 0.0, 10.0 );
41-
b = random_uniform( a, 40.0 ) + STDLIB_CONSTANT_FLOAT64_EPS;
42-
c = a + random_uniform( 0.0, b - a );
41+
b = random_uniform( a + STDLIB_CONSTANT_FLOAT64_EPS, 40.0 );
42+
c = random_uniform( a, b );
4343
y = stdlib_base_dists_triangular_logpdf( x, a, b, c );
4444
printf( "x: %lf, a: %lf, b: %lf, c: %lf, ln(f(x;a,b,c)): %lf\n", x, a, b, c, y );
4545
}

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/include/stdlib/stats/base/dists/triangular/logpdf.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 natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a` and upper limit `b` and mode `c` at a value `x`.
30+
* Evaluates the natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a`, upper limit `b`, and mode `c` at a value `x`.
3131
*/
3232
double stdlib_base_dists_triangular_logpdf( const double x, const double a, const double b, const double c );
3333

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var LN2 = require( '@stdlib/constants/float64/ln-two' );
2929
// MAIN //
3030

3131
/**
32-
* Evaluates the natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a` and upper limit `b` and mode `c` at a value `x`.
32+
* Evaluates the natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a`, upper limit `b`, and mode `c` at a value `x`.
3333
*
3434
* @param {number} x - input value
3535
* @param {number} a - lower limit

lib/node_modules/@stdlib/stats/base/dists/triangular/logpdf/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 natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a` and upper limit `b` and mode `c` at a value `x`.
29+
* Evaluates the natural logarithm of the probability density function (PDF) for a triangular distribution with lower limit `a`, upper limit `b`, and mode `c` at a value `x`.
3030
*
3131
* @private
3232
* @param {number} x - input value

0 commit comments

Comments
 (0)