From 501db1bb1515184b32a7b32816fd6b7dbedcba7c Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Thu, 16 Jan 2025 20:10:44 -0800 Subject: [PATCH 1/8] docs: update related packages sections PR-URL: https://github.com/stdlib-js/stdlib/pull/4784 Reviewed-by: Athan Reines --- 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: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - 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: na --- --- 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: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - 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: na --- --- .../blas/ext/base/sapxsumkbn/README.md | 2 +- .../@stdlib/constants/float32/pi/README.md | 18 ++ .../stats/base/dists/planck/mode/README.md | 89 +++++++++ .../dists/planck/mode/benchmark/benchmark.js | 12 +- .../planck/mode/benchmark/benchmark.native.js | 67 +++++++ .../dists/planck/mode/benchmark/c/Makefile | 146 +++++++++++++++ .../dists/planck/mode/benchmark/c/benchmark.c | 140 +++++++++++++++ .../stats/base/dists/planck/mode/binding.gyp | 170 ++++++++++++++++++ .../dists/planck/mode/examples/c/Makefile | 146 +++++++++++++++ .../dists/planck/mode/examples/c/example.c | 38 ++++ .../stats/base/dists/planck/mode/include.gypi | 53 ++++++ .../stdlib/stats/base/dists/planck/mode.h | 38 ++++ .../base/dists/planck/mode/lib/native.js | 58 ++++++ .../base/dists/planck/mode/manifest.json | 85 +++++++++ .../stats/base/dists/planck/mode/package.json | 3 + .../stats/base/dists/planck/mode/src/Makefile | 70 ++++++++ .../stats/base/dists/planck/mode/src/addon.c | 23 +++ .../stats/base/dists/planck/mode/src/main.c | 37 ++++ .../dists/planck/mode/test/test.native.js | 77 ++++++++ 19 files changed, 1268 insertions(+), 4 deletions(-) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/include/stdlib/stats/base/dists/planck/mode.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/src/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/src/main.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.native.js diff --git a/lib/node_modules/@stdlib/blas/ext/base/sapxsumkbn/README.md b/lib/node_modules/@stdlib/blas/ext/base/sapxsumkbn/README.md index 5be0312c484c..acb3b06bdcc1 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/sapxsumkbn/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/sapxsumkbn/README.md @@ -166,7 +166,7 @@ console.log( v ); ## See Also - [`@stdlib/blas/ext/base/dapxsumkbn`][@stdlib/blas/ext/base/dapxsumkbn]: add a constant to each double-precision floating-point strided array element and compute the sum using an improved Kahan–Babuška algorithm. -- [`@stdlib/blas/ext/base/gapxsumkbn`][@stdlib/blas/ext/base/gapxsumkbn]: add a constant to each strided array element and compute the sum using an improved Kahan–Babuška algorithm. +- [`@stdlib/blas/ext/base/gapxsumkbn`][@stdlib/blas/ext/base/gapxsumkbn]: add a scalar constant to each strided array element and compute the sum using an improved Kahan–Babuška algorithm. - [`@stdlib/blas/ext/base/sapxsum`][@stdlib/blas/ext/base/sapxsum]: add a constant to each single-precision floating-point strided array element and compute the sum. - [`@stdlib/blas/ext/base/ssumkbn`][@stdlib/blas/ext/base/ssumkbn]: calculate the sum of single-precision floating-point strided array elements using an improved Kahan–Babuška algorithm. diff --git a/lib/node_modules/@stdlib/constants/float32/pi/README.md b/lib/node_modules/@stdlib/constants/float32/pi/README.md index d09323920e77..ac7408481fde 100644 --- a/lib/node_modules/@stdlib/constants/float32/pi/README.md +++ b/lib/node_modules/@stdlib/constants/float32/pi/README.md @@ -108,6 +108,14 @@ Macro for the mathematical constant [π][pi]. @@ -118,6 +126,16 @@ Macro for the mathematical constant [π][pi]. [pi]: https://en.wikipedia.org/wiki/Pi + + +[@stdlib/constants/float32/fourth-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/fourth-pi + +[@stdlib/constants/float32/half-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/half-pi + +[@stdlib/constants/float32/two-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/two-pi + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md index 0d62c5c213a4..b79fce122892 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md @@ -118,6 +118,95 @@ for ( i = 0; i < lambda.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/planck/mode.h" +``` + +#### stdlib_base_dists_planck_mode( lambda ) + +Evaluates the mode for an planck distribution. + +```c +double out = stdlib_base_dists_planck_mean( 0.1 ); +// returns ~0 +``` + +The function accepts the following arguments: + +- **lambda**: `[in] double` shape parameter + +```c +double stdlib_base_dists_planck_mode( const double lambda ); +``` +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/planck/mode.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v * (max - min) ); +} +int main( void ) { + double lambda; + double y; + int i; + for ( i = 0; i < 25; i++ ) { + lambda = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_planck_mode( lambda ); + printf( "lambda: %lf, E(X;λ): %lf\n", lambda, y ); + } +} +``` + +
+ + + +
+ + + diff --git a/lib/node_modules/@stdlib/constants/float32/pi/README.md b/lib/node_modules/@stdlib/constants/float32/pi/README.md index ac7408481fde..b9cd2365b2d3 100644 --- a/lib/node_modules/@stdlib/constants/float32/pi/README.md +++ b/lib/node_modules/@stdlib/constants/float32/pi/README.md @@ -108,14 +108,6 @@ Macro for the mathematical constant [π][pi]. @@ -128,12 +120,6 @@ Macro for the mathematical constant [π][pi]. -[@stdlib/constants/float32/fourth-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/fourth-pi - -[@stdlib/constants/float32/half-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/half-pi - -[@stdlib/constants/float32/two-pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/two-pi - diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.native.js index 7a9c63f120ad..f3133c8031b0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.native.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.native.js @@ -37,7 +37,7 @@ var opts = { // TESTS // -tape( 'main export is a function', opts , function test( t ) { +tape( 'main export is a function', opts, function test( t ) { t.ok( true, __filename ); t.strictEqual( typeof mode, 'function', 'main export is a function' ); t.end(); @@ -50,7 +50,7 @@ tape( 'if provided `NaN` for `lambda`, the function returns `NaN`', opts, functi t.end(); }); -tape( 'if provided a shape parameter `lambda` which is nonpositive, the function returns `NaN`', opts , function test( t ) { +tape( 'if provided a shape parameter `lambda` which is nonpositive, the function returns `NaN`', opts, function test( t ) { var v; v = mode( 0.0 ); @@ -62,7 +62,7 @@ tape( 'if provided a shape parameter `lambda` which is nonpositive, the function t.end(); }); -tape( 'the function returns `0.0` as the mode of a Planck distribution', opts , function test( t ) { +tape( 'the function returns `0.0` as the mode of a Planck distribution', opts, function test( t ) { var lambda; var i; var y;