Skip to content

Commit

Permalink
chore: minor clean-up
Browse files Browse the repository at this point in the history
---
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
---
  • Loading branch information
Planeshifter committed Dec 23, 2024
1 parent 9f71ae0 commit 0ba282b
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function request( opts, data, clbk ) {
body += chunk;
}
/**
* Event listener invoked upon a response end.
* Event listener invoked upon a response end.
*
* @private
* @returns {void}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ function transformer( tree, file, clbk ) {
* <!-- <equation class="equation" label="eq:triangular_root" align="center" raw="n = \frac{\sqrt{8x+1} - 1}{2}" alt="Triangular root formula."> -->
*
* <div class="equation" align="center" data-raw-text="n = \frac{\sqrt{8x+1} - 1}{2}" data-equation="eq:triangular_root">
* <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.">
* <br>
* <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.">
* <br>
* </div>
*
* <!-- </equation> -->
Expand All @@ -191,8 +191,8 @@ function transformer( tree, file, clbk ) {
* \`\`\`
*
* <!-- <div class="equation" align="center" data-raw-text="n = \frac{\sqrt{8x+1} - 1}{2}" data-equation="eq:triangular_root">
* <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.">
* <br>
* <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.">
* <br>
* </div> -->
*
* <!-- </equation> -->
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/array/base/take-map/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* var x = [ 1, 2, 3, 4 ];
*
* function mapFunction( val ) {
return val;
}
* return val;
* }
*
* var indices = [ 0, 0, 1, 1, 3, 3 ];
* var y = takeMap( x, indices, 'throw', mapFunction );
Expand All @@ -45,8 +45,8 @@
* var indices = [ 0, 0, 1, 1, 3, 3 ];
*
* function clbk( val ) {
return val;
}
* return val;
* }
*
* var arr = takeMap.assign( x, indices, 'throw', out, 1, 0, mapFunction );
* // returns [ 1, 1, 2, 2, 4, 4 ]
Expand Down
24 changes: 12 additions & 12 deletions lib/node_modules/@stdlib/math/base/special/csch/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
*
* @example
* var csch = require( '@stdlib/math/base/special/csch' );
*
* var v = csch( 0.0 );
* // returns Infinity
*
* v = csch( 2.0 );
* // returns ~0.2757
*
* v = csch( -2.0 );
* // returns ~-0.2757
*
* v = csch( NaN );
* // returns NaN
*
* var v = csch( 0.0 );
* // returns Infinity
*
* v = csch( 2.0 );
* // returns ~0.2757
*
* v = csch( -2.0 );
* // returns ~-0.2757
*
* v = csch( NaN );
* // returns NaN
*/

// MODULES //
Expand Down
3 changes: 1 addition & 2 deletions lib/node_modules/@stdlib/regexp/decimal-number/lib/regexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ var reDecimalNumber = require( './main.js' );
* - `[0-9]+`
* - match the characters `[0-9]` one or more times
*
*
@constant
* @constant
* @type {RegExp}
* @default /[-+]{0,1}[0-9]*\.[0-9]+/
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ var reDecimalNumber = require( './main.js' );
* - `[0-9]+`
* - match the characters `[0-9]` one or more times
*
*
@constant
* @constant
* @type {RegExp}
* @default /([-+]{0,1}[0-9]*\.[0-9]+)/
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/stats/base/dists/f/cdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ y = cdf( 2.0, 0.5, 0.0 );

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

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).
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).

```javascript
var mycdf = cdf.factory( 10.0, 2.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/stats/base/dists/f/entropy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var entropy = require( '@stdlib/stats/base/dists/f/entropy' );

#### entropy( d1, d2 )

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]).
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]).

```javascript
var v = entropy( 4.0, 7.0 );
Expand Down Expand Up @@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_f_entropy( d1, d2 )

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]).
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]).

```c
double out = stdlib_base_dists_f_entropy( 3.0, 7.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/stats/base/dists/f/mean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var mean = require( '@stdlib/stats/base/dists/f/mean' );

#### mean( d1, d2 )

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).
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).

```javascript
var v = mean( 4.0, 5.0 );
Expand Down Expand Up @@ -170,7 +170,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_f_mean( d1, d2 )

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).
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).

```c
double out = stdlib_base_dists_f_mean( 3.0, 5.0 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/stats/base/dists/f/mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var mode = require( '@stdlib/stats/base/dists/f/mode' );

#### mode( d1, d2 )

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

```javascript
var v = mode( 4.0, 5.0 );
Expand Down Expand Up @@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_f_mode( d1, d2 )

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

```c
double out = stdlib_base_dists_f_mode( 3.0, 5.0 );
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/stats/base/dists/f/pdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ y = pdf( 2.0, 1.0, -1.0 );

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

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).
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).

```javascript
var mypdf = pdf.factory( 6.0, 7.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ y = quantile( 0.4, 1.0, 0.0 );

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

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).
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).

```javascript
var myquantile = quantile.factory( 10.0, 2.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var skewness = require( '@stdlib/stats/base/dists/f/skewness' );

#### skewness( d1, d2 )

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

```javascript
var v = skewness( 4.0, 7.0 );
Expand Down Expand Up @@ -175,7 +175,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_f_skewness( d1, d2 )

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

```c
double out = stdlib_base_dists_f_skewness( 3.0, 7.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var stdev = require( '@stdlib/stats/base/dists/f/stdev' );

#### stdev( d1, d2 )

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).
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).

```javascript
var v = stdev( 4.0, 5.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var variance = require( '@stdlib/stats/base/dists/f/variance' );

#### variance( d1, d2 )

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

```javascript
var v = variance( 4.0, 5.0 );
Expand Down Expand Up @@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {

#### stdlib_base_dists_f_variance( d1, d2 )

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

```c
double out = stdlib_base_dists_f_variance( 3.0, 5.0 );
Expand Down
16 changes: 8 additions & 8 deletions lib/node_modules/@stdlib/stats/base/dists/normal/stdev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ int main( void ) {

<!-- /.c -->

<!-- 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. -->

<section class="references">

</section>

<!-- /.references -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

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

<!-- /.links -->

<!-- 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. -->

<section class="references">

</section>

<!-- /.references -->
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ int main( void ) {
for ( i = 0; i < 25; i++ ) {
a = random_uniform( 0.0, 10.0 );
b = random_uniform( 0.0, 10.0 ) + a;
c = a + (b - a) * random_uniform( 0.0, 1.0 ); // mode between a and b
b = random_uniform( a, 10.0 + a );
c = random_uniform( a, b ); // mode between a and b
y = stdlib_base_dists_triangular_mean( a, b, c );
printf( "a: %lf, b: %lf, c: %lf, E(X;a,b,c): %lf\n", a, b, c, y );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ static double tic( void ) {
}

/**
* Generates a random number on the interval [0,20).
* Generates a random number on the interval [min,max).
*
* @return random number
* @param min minimum value (inclusive)
* @param max maximum value (exclusive)
* @return random number
*/
static double rand_double( void ) {
int r = rand();
return 20.0*(double)r / ( (double)RAND_MAX + 1.0 );
static double random_uniform( const double min, const double max ) {
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
return min + ( v*(max-min) );
}

/**
Expand All @@ -96,11 +98,11 @@ static double benchmark( void ) {
double t;
int i;

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

t = tic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ int main( void ) {

for ( i = 0; i < 25; i++ ) {
a = random_uniform( 0.0, 10.0 );
b = random_uniform( 0.0, 10.0 ) + a;
c = a + (b - a) * random_uniform( 0.0, 1.0 ); // mode between a and b
b = random_uniform( a, a+10.0 );
c = random_uniform( a, b ); // mode between a and b
y = stdlib_base_dists_triangular_mean( a, b, c );
printf( "a: %lf, b: %lf, c: %lf, E(X;a,b,c): %lf\n", a, b, c, y );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var addon = require( './../src/addon.node' );
*
* @example
* var v = mean( 2.0, 8.0, 4.0 );
* // returns 4.666666666666667
* // returns ~4.667
*
* @example
* var v = mean( -1.0, 5.0, 6.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include "stdlib/math/base/assert/is_nan.h"

/**
* Evaluates the expected value (mean) of a triangular distribution with lower bound a, upper bound b and mode (peak) c.
* Returns the expected value of a triangular distribution.
*
* @param a lower bound
* @param b upper bound
* @param c mode (peak)
* @returns expected value (mean)
* @param a minimum support
* @param b maximum support
* @param c mode
* @returns expected value
*
* @example
* double v = mean( 0.0, 10.0, 5.0 );
Expand Down

0 comments on commit 0ba282b

Please sign in to comment.