Skip to content

Commit 0ba282b

Browse files
committedDec 23, 2024
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: na - 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 --- --- 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: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
1 parent 9f71ae0 commit 0ba282b

File tree

21 files changed

+66
-66
lines changed

21 files changed

+66
-66
lines changed
 

‎lib/node_modules/@stdlib/_tools/github/create-token/lib/request.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function request( opts, data, clbk ) {
115115
body += chunk;
116116
}
117117
/**
118-
* Event listener invoked upon a response end.
118+
* Event listener invoked upon a response end.
119119
*
120120
* @private
121121
* @returns {void}

‎lib/node_modules/@stdlib/_tools/remark/plugins/remark-svg-equations/lib/transformer.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ function transformer( tree, file, clbk ) {
169169
* <!-- <equation class="equation" label="eq:triangular_root" align="center" raw="n = \frac{\sqrt{8x+1} - 1}{2}" alt="Triangular root formula."> -->
170170
*
171171
* <div class="equation" align="center" data-raw-text="n = \frac{\sqrt{8x+1} - 1}{2}" data-equation="eq:triangular_root">
172-
* <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b295a09a80f4fd0cc84682dcda0fe3e354394c0c/lib/node_modules/@stdlib/assert/is-square-triangular-number/docs/img/equation_triangular_root.svg" alt="Triangular root formula.">
173-
* <br>
172+
* <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b295a09a80f4fd0cc84682dcda0fe3e354394c0c/lib/node_modules/@stdlib/assert/is-square-triangular-number/docs/img/equation_triangular_root.svg" alt="Triangular root formula.">
173+
* <br>
174174
* </div>
175175
*
176176
* <!-- </equation> -->
@@ -191,8 +191,8 @@ function transformer( tree, file, clbk ) {
191191
* \`\`\`
192192
*
193193
* <!-- <div class="equation" align="center" data-raw-text="n = \frac{\sqrt{8x+1} - 1}{2}" data-equation="eq:triangular_root">
194-
* <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b295a09a80f4fd0cc84682dcda0fe3e354394c0c/lib/node_modules/@stdlib/assert/is-square-triangular-number/docs/img/equation_triangular_root.svg" alt="Triangular root formula.">
195-
* <br>
194+
* <img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b295a09a80f4fd0cc84682dcda0fe3e354394c0c/lib/node_modules/@stdlib/assert/is-square-triangular-number/docs/img/equation_triangular_root.svg" alt="Triangular root formula.">
195+
* <br>
196196
* </div> -->
197197
*
198198
* <!-- </equation> -->

‎lib/node_modules/@stdlib/array/base/take-map/lib/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
* var x = [ 1, 2, 3, 4 ];
3030
*
3131
* function mapFunction( val ) {
32-
return val;
33-
}
32+
* return val;
33+
* }
3434
*
3535
* var indices = [ 0, 0, 1, 1, 3, 3 ];
3636
* var y = takeMap( x, indices, 'throw', mapFunction );
@@ -45,8 +45,8 @@
4545
* var indices = [ 0, 0, 1, 1, 3, 3 ];
4646
*
4747
* function clbk( val ) {
48-
return val;
49-
}
48+
* return val;
49+
* }
5050
*
5151
* var arr = takeMap.assign( x, indices, 'throw', out, 1, 0, mapFunction );
5252
* // returns [ 1, 1, 2, 2, 4, 4 ]

‎lib/node_modules/@stdlib/math/base/special/csch/lib/index.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
*
2626
* @example
2727
* var csch = require( '@stdlib/math/base/special/csch' );
28-
*
29-
* var v = csch( 0.0 );
30-
* // returns Infinity
31-
*
32-
* v = csch( 2.0 );
33-
* // returns ~0.2757
34-
*
35-
* v = csch( -2.0 );
36-
* // returns ~-0.2757
37-
*
38-
* v = csch( NaN );
39-
* // returns NaN
28+
*
29+
* var v = csch( 0.0 );
30+
* // returns Infinity
31+
*
32+
* v = csch( 2.0 );
33+
* // returns ~0.2757
34+
*
35+
* v = csch( -2.0 );
36+
* // returns ~-0.2757
37+
*
38+
* v = csch( NaN );
39+
* // returns NaN
4040
*/
4141

4242
// MODULES //

‎lib/node_modules/@stdlib/regexp/decimal-number/lib/regexp.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ var reDecimalNumber = require( './main.js' );
4242
* - `[0-9]+`
4343
* - match the characters `[0-9]` one or more times
4444
*
45-
*
46-
@constant
45+
* @constant
4746
* @type {RegExp}
4847
* @default /[-+]{0,1}[0-9]*\.[0-9]+/
4948
*/

‎lib/node_modules/@stdlib/regexp/decimal-number/lib/regexp_capture.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ var reDecimalNumber = require( './main.js' );
4545
* - `[0-9]+`
4646
* - match the characters `[0-9]` one or more times
4747
*
48-
*
49-
@constant
48+
* @constant
5049
* @type {RegExp}
5150
* @default /([-+]{0,1}[0-9]*\.[0-9]+)/
5251
*/

‎lib/node_modules/@stdlib/stats/base/dists/f/cdf/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ y = cdf( 2.0, 0.5, 0.0 );
109109

110110
#### cdf.factory( d1, d2 )
111111

112-
Returns a function for evaluating the [cumulative distribution function][cdf] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
112+
Returns a function for evaluating the [cumulative distribution function][cdf] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
113113

114114
```javascript
115115
var mycdf = cdf.factory( 10.0, 2.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/entropy/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var entropy = require( '@stdlib/stats/base/dists/f/entropy' );
5959

6060
#### entropy( d1, d2 )
6161

62-
Returns the [differential entropy][entropy] of a [F][f-distribution] distribution with numerator degrees of freedom `d1` and denominator degrees of freedom `d2` (in [nats][nats]).
62+
Returns the [differential entropy][entropy] of an [F][f-distribution] distribution with numerator degrees of freedom `d1` and denominator degrees of freedom `d2` (in [nats][nats]).
6363

6464
```javascript
6565
var v = entropy( 4.0, 7.0 );
@@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {
172172

173173
#### stdlib_base_dists_f_entropy( d1, d2 )
174174

175-
Evaluates the [differential entropy][entropy] of a [F][f-distribution] distribution with numerator degrees of freedom `d1` and denominator degrees of freedom `d2` (in [nats][nats]).
175+
Evaluates the [differential entropy][entropy] of an [F][f-distribution] distribution with numerator degrees of freedom `d1` and denominator degrees of freedom `d2` (in [nats][nats]).
176176

177177
```c
178178
double out = stdlib_base_dists_f_entropy( 3.0, 7.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/mean/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var mean = require( '@stdlib/stats/base/dists/f/mean' );
5757

5858
#### mean( d1, d2 )
5959

60-
Returns the [expected value][expected-value] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
60+
Returns the [expected value][expected-value] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
6161

6262
```javascript
6363
var v = mean( 4.0, 5.0 );
@@ -170,7 +170,7 @@ for ( i = 0; i < 10; i++ ) {
170170

171171
#### stdlib_base_dists_f_mean( d1, d2 )
172172

173-
Evaluates the [expected value][expected-value] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
173+
Evaluates the [expected value][expected-value] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
174174

175175
```c
176176
double out = stdlib_base_dists_f_mean( 3.0, 5.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/mode/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var mode = require( '@stdlib/stats/base/dists/f/mode' );
5959

6060
#### mode( d1, d2 )
6161

62-
Returns the [mode][mode] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
62+
Returns the [mode][mode] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
6363

6464
```javascript
6565
var v = mode( 4.0, 5.0 );
@@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {
172172

173173
#### stdlib_base_dists_f_mode( d1, d2 )
174174

175-
Evaluates the [mode][mode] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
175+
Evaluates the [mode][mode] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
176176

177177
```c
178178
double out = stdlib_base_dists_f_mode( 3.0, 5.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/pdf/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ y = pdf( 2.0, 1.0, -1.0 );
103103

104104
#### pdf.factory( d1, d2 )
105105

106-
Returns a `function` for evaluating the [PDF][pdf] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
106+
Returns a `function` for evaluating the [PDF][pdf] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
107107

108108
```javascript
109109
var mypdf = pdf.factory( 6.0, 7.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/quantile/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ y = quantile( 0.4, 1.0, 0.0 );
113113

114114
#### quantile.factory( d1, d2 )
115115

116-
Returns a function for evaluating the quantile function of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
116+
Returns a function for evaluating the quantile function of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
117117

118118
```javascript
119119
var myquantile = quantile.factory( 10.0, 2.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/skewness/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var skewness = require( '@stdlib/stats/base/dists/f/skewness' );
5959

6060
#### skewness( d1, d2 )
6161

62-
Returns the [skewness][skewness] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
62+
Returns the [skewness][skewness] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
6363

6464
```javascript
6565
var v = skewness( 4.0, 7.0 );
@@ -175,7 +175,7 @@ for ( i = 0; i < 10; i++ ) {
175175

176176
#### stdlib_base_dists_f_skewness( d1, d2 )
177177

178-
Evaluates the [skewness][skewness] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
178+
Evaluates the [skewness][skewness] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
179179

180180
```c
181181
double out = stdlib_base_dists_f_skewness( 3.0, 7.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/stdev/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var stdev = require( '@stdlib/stats/base/dists/f/stdev' );
5959

6060
#### stdev( d1, d2 )
6161

62-
Returns the [standard deviation][standard-deviation] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
62+
Returns the [standard deviation][standard-deviation] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
6363

6464
```javascript
6565
var v = stdev( 4.0, 5.0 );

‎lib/node_modules/@stdlib/stats/base/dists/f/variance/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var variance = require( '@stdlib/stats/base/dists/f/variance' );
5959

6060
#### variance( d1, d2 )
6161

62-
Returns the [variance][variance] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
62+
Returns the [variance][variance] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
6363

6464
```javascript
6565
var v = variance( 4.0, 5.0 );
@@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {
172172

173173
#### stdlib_base_dists_f_variance( d1, d2 )
174174

175-
Evaluates the [variance][variance] of a [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
175+
Evaluates the [variance][variance] of an [F][f-distribution] distribution with parameters `d1` (numerator degrees of freedom) and `d2` (denominator degrees of freedom).
176176

177177
```c
178178
double out = stdlib_base_dists_f_variance( 3.0, 5.0 );

‎lib/node_modules/@stdlib/stats/base/dists/normal/stdev/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ int main( void ) {
200200

201201
<!-- /.c -->
202202

203+
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
204+
205+
<section class="references">
206+
207+
</section>
208+
209+
<!-- /.references -->
210+
203211
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
204212

205213
<section class="related">
@@ -219,11 +227,3 @@ int main( void ) {
219227
</section>
220228

221229
<!-- /.links -->
222-
223-
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
224-
225-
<section class="references">
226-
227-
</section>
228-
229-
<!-- /.references -->

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ int main( void ) {
223223
224224
for ( i = 0; i < 25; i++ ) {
225225
a = random_uniform( 0.0, 10.0 );
226-
b = random_uniform( 0.0, 10.0 ) + a;
227-
c = a + (b - a) * random_uniform( 0.0, 1.0 ); // mode between a and b
226+
b = random_uniform( a, 10.0 + a );
227+
c = random_uniform( a, b ); // mode between a and b
228228
y = stdlib_base_dists_triangular_mean( a, b, c );
229229
printf( "a: %lf, b: %lf, c: %lf, E(X;a,b,c): %lf\n", a, b, c, y );
230230
}

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

+11-9
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ static double tic( void ) {
7575
}
7676

7777
/**
78-
* Generates a random number on the interval [0,20).
78+
* Generates a random number on the interval [min,max).
7979
*
80-
* @return random number
80+
* @param min minimum value (inclusive)
81+
* @param max maximum value (exclusive)
82+
* @return random number
8183
*/
82-
static double rand_double( void ) {
83-
int r = rand();
84-
return 20.0*(double)r / ( (double)RAND_MAX + 1.0 );
84+
static double random_uniform( const double min, const double max ) {
85+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
86+
return min + ( v*(max-min) );
8587
}
8688

8789
/**
@@ -96,11 +98,11 @@ static double benchmark( void ) {
9698
double t;
9799
int i;
98100

99-
// Generate random parameters for the triangular distribution
101+
// Generate random parameters for the triangular distribution:
100102
for ( i = 0; i < 100; i++ ) {
101-
a[ i ] = rand_double() * 20.0; // Lower bound
102-
b[ i ] = ( rand_double() * 20.0 ) + a[ i ]; // Upper bound
103-
c[ i ] = ( rand_double() * ( b[i] - a[i] ) ) + a[i]; // Mode
103+
a[ i ] = random_uniform( 0.0, 20.0 ); // Lower bound
104+
b[ i ] = random_uniform( a[i], a[i]+20.0 ); // Upper bound
105+
c[ i ] = random_uniform( a[i], b[i] ); // Mode
104106
}
105107

106108
t = tic();

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ int main( void ) {
3434

3535
for ( i = 0; i < 25; i++ ) {
3636
a = random_uniform( 0.0, 10.0 );
37-
b = random_uniform( 0.0, 10.0 ) + a;
38-
c = a + (b - a) * random_uniform( 0.0, 1.0 ); // mode between a and b
37+
b = random_uniform( a, a+10.0 );
38+
c = random_uniform( a, b ); // mode between a and b
3939
y = stdlib_base_dists_triangular_mean( a, b, c );
4040
printf( "a: %lf, b: %lf, c: %lf, E(X;a,b,c): %lf\n", a, b, c, y );
4141
}

‎lib/node_modules/@stdlib/stats/base/dists/triangular/mean/lib/native.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var addon = require( './../src/addon.node' );
4040
*
4141
* @example
4242
* var v = mean( 2.0, 8.0, 4.0 );
43-
* // returns 4.666666666666667
43+
* // returns ~4.667
4444
*
4545
* @example
4646
* var v = mean( -1.0, 5.0, 6.0 );

‎lib/node_modules/@stdlib/stats/base/dists/triangular/mean/src/main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
#include "stdlib/math/base/assert/is_nan.h"
2121

2222
/**
23-
* Evaluates the expected value (mean) of a triangular distribution with lower bound a, upper bound b and mode (peak) c.
23+
* Returns the expected value of a triangular distribution.
2424
*
25-
* @param a lower bound
26-
* @param b upper bound
27-
* @param c mode (peak)
28-
* @returns expected value (mean)
25+
* @param a minimum support
26+
* @param b maximum support
27+
* @param c mode
28+
* @returns expected value
2929
*
3030
* @example
3131
* double v = mean( 0.0, 10.0, 5.0 );

0 commit comments

Comments
 (0)
Please sign in to comment.