Skip to content

Commit 668d0c8

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
--- 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: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 ---
2 parents 56388ac + f9ec3b6 commit 668d0c8

File tree

29 files changed

+1315
-26
lines changed

29 files changed

+1315
-26
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ for ( i = 0; i < 100; i++ ) {
201201
Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [Fréchet][frechet-distribution] distribution with shape `alpha`, scale `s`, and location `m` at a value `x`.
202202

203203
```c
204-
double y = stdlib_base_frechet_logcdf( 10.0, 2.0, 3.0, 2.0 );
204+
double y = stdlib_base_dists_frechet_logcdf( 10.0, 2.0, 3.0, 2.0 );
205205
// returns ~-0.141
206206
```
207207

lib/node_modules/@stdlib/stats/base/dists/frechet/median/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ for ( i = 0; i < 10; i++ ) {
173173
#include "stdlib/stats/base/dists/frechet/median.h"
174174
```
175175

176-
#### sstdlib_base_dists_frechet_median( alpha, s, m )
176+
#### stdlib_base_dists_frechet_median( alpha, s, m )
177177

178178
Returns the median for a Fréchet distribution with shape `alpha`, scale `s`, and location `m`.
179179

180180
```c
181-
double y = stdlib_base_frechet_median( 5.0, 2.0, 0.0 );
181+
double y = stdlib_base_dists_frechet_median( 5.0, 2.0, 0.0 );
182182
// returns ~2.152
183183
```
184184

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ for ( i = 0; i < 10; i++ ) {
178178
Returns the mode for a Fréchet distribution with shape `alpha`, scale `s`, and location `m`.
179179

180180
```c
181-
double y = stdlib_base_frechet_mode( 5.0, 2.0, 0.0 );
181+
double y = stdlib_base_dists_frechet_mode( 5.0, 2.0, 0.0 );
182182
// returns ~1.928
183183
```
184184

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ for ( i = 0; i < 10; i++ ) {
187187
Returns the skewness for a Fréchet distribution with shape `alpha`, scale `s`, and location `m`.
188188

189189
```c
190-
double y = stdlib_base_frechet_skewness( 5.0, 2.0, 0.0 );
190+
double y = stdlib_base_dists_frechet_skewness( 5.0, 2.0, 0.0 );
191191
// returns ~3.535
192192
```
193193

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ for ( i = 0; i < 10; i++ ) {
187187
Returns the variance for a Fréchet distribution with shape `alpha`, scale `s`, and location `m`.
188188

189189
```c
190-
double y = stdlib_base_frechet_variance( 5.0, 2.0, 0.0 );
190+
double y = stdlib_base_dists_frechet_variance( 5.0, 2.0, 0.0 );
191191
// returns ~0.535
192192
```
193193

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ static double random_uniform( const double min, const double max ) {
9393
*/
9494
static double benchmark( void ) {
9595
double elapsed;
96-
double a[ 100 ];
97-
double b[ 100 ];
96+
double a[ 100 ];
97+
double b[ 100 ];
9898
double y;
9999
double t;
100100
int i;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ int main( void ) {
2929
double mean;
3030
double a;
3131
double b;
32-
int i;
32+
int i;
3333

3434
for ( i = 0; i < 10; i++ ) {
3535
a = random_uniform( 0.0, 10.0 );
36-
b = random_uniform( 0.0, 10.0 );
37-
mean = stdlib_base_dists_kumaraswamy_mean( a, b );
36+
b = random_uniform( 0.0, 10.0 );
37+
mean = stdlib_base_dists_kumaraswamy_mean( a, b );
3838
printf( "a: %.4f, b: %.4f, E(X;a,b): %.4f\n", a, b, mean );
3939
}
4040
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
/**
2424
* Returns the expected value of a Kumaraswamy's double bounded distribution.
2525
*
26-
* @param a first shape parameter
27-
* @param b second shape parameter
26+
* @param a first shape parameter
27+
* @param b second shape parameter
2828
* @return expected value
2929
*
3030
* @example
@@ -36,7 +36,7 @@ double stdlib_base_dists_kumaraswamy_mean( const double a, const double b ) {
3636
stdlib_base_is_nan( a ) ||
3737
stdlib_base_is_nan( b ) ||
3838
a <= 0.0 ||
39-
b <= 0.0
39+
b <= 0.0
4040
) {
4141
return 0.0/0.0; // NaN
4242
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ for ( i = 0; i < 100; i++ ) {
170170
Evaluates the [cumulative distribution function][cdf] (CDF) for a [Lévy][levy-distribution] distribution with parameters `mu` (location parameter) and `c > 0` (scale parameter).
171171

172172
```c
173-
double out = stdlib_base_levy_cdf( 2.0, 0.0, 1.0 );
173+
double out = stdlib_base_dists_levy_cdf( 2.0, 0.0, 1.0 );
174174
// returns ~0.48
175175
```
176176

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

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,100 @@ for ( i = 0; i < 10; i++ ) {
134134

135135
<!-- /.examples -->
136136

137-
<!-- 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. -->
137+
<!-- C interface documentation. -->
138138

139-
<section class="references">
139+
* * *
140+
141+
<section class="c">
142+
143+
## C APIs
144+
145+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
146+
147+
<section class="intro">
148+
149+
</section>
150+
151+
<!-- /.intro -->
152+
153+
<!-- C usage documentation. -->
154+
155+
<section class="usage">
156+
157+
### Usage
158+
159+
```c
160+
#include "stdlib/stats/base/dists/lognormal/mode.h"
161+
```
162+
163+
#### stdlib_base_dists_lognormal_mode( mu, sigma )
164+
165+
Returns the mode for a lognormal distribution with location `mu` and scale `sigma`.
166+
167+
```c
168+
double out = stdlib_base_dists_lognormal_mode( 0.0, 1.0 );
169+
// returns ~0.368
170+
```
171+
172+
The function accepts the following arguments:
173+
174+
- **mu**: `[in] double` location parameter.
175+
- **sigma**: `[in] double` scale parameter.
176+
177+
```c
178+
double stdlib_base_dists_lognormal_mode( const double mu, const double sigma );
179+
```
180+
181+
</section>
182+
183+
<!-- /.usage -->
184+
185+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
186+
187+
<section class="notes">
188+
189+
</section>
190+
191+
<!-- /.notes -->
192+
193+
<!-- C API usage examples. -->
194+
195+
<section class="examples">
196+
197+
### Examples
198+
199+
```c
200+
#include "stdlib/stats/base/dists/lognormal/mode.h"
201+
#include <stdlib.h>
202+
#include <stdio.h>
203+
204+
static double random_uniform( const double min, const double max ) {
205+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
206+
return min + ( v*(max-min) );
207+
}
208+
209+
int main( void ) {
210+
double sigma;
211+
double mu;
212+
double y;
213+
int i;
214+
215+
for ( i = 0; i < 10; i++ ) {
216+
mu = random_uniform( -5.0, 5.0 );
217+
sigma = random_uniform( 0.1, 20.0 );
218+
y = stdlib_base_dists_lognormal_mode( mu, sigma );
219+
printf( "µ: %.4f, σ: %.4f, Mode(X;µ,σ): %.4f\n", mu, sigma, y );
220+
}
221+
}
222+
```
223+
224+
</section>
225+
226+
<!-- /.examples -->
140227

141228
</section>
142229

143-
<!-- /.references -->
230+
<!-- /.c -->
144231

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

0 commit comments

Comments
 (0)