Skip to content

Commit a72a67a

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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: passed - 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 ---
1 parent 6a0d6b8 commit a72a67a

File tree

9 files changed

+31
-20
lines changed

9 files changed

+31
-20
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
type: amend-message
3+
---
4+
feat: add C implementation for `stats/base/dists/weibull/mean`
5+
6+
PR-URL: #4052
7+
Closes: #3843
8+
9+
Co-authored-by: Philipp Burckhardt <[email protected]>
10+
Reviewed-by: Philipp Burckhardt <[email protected]>
11+
Signed-off-by: Philipp Burckhardt <[email protected]>

lib/node_modules/@stdlib/number/float32/base/exponent/examples/c/example.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
#include <inttypes.h>
2323

2424
int main( void ) {
25-
float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e38f, -1.0e38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f };
25+
const float x[] = { 4.0f, 0.0f, -0.0f, 1.0f, -1.0f, 3.14f, -3.14f, 1.0e38f, -1.0e38f, 1.0f/0.0f, -1.0f/0.0f, 0.0f/0.0f };
2626

27-
int32_t out;
28-
int i;
29-
for ( i = 0; i < 12; i++ ) {
30-
out = stdlib_base_float32_exponent( x[ i ] );
31-
printf( "%f => out: %" PRId32 "\n", x[ i ], out );
32-
}
27+
int32_t out;
28+
int i;
29+
for ( i = 0; i < 12; i++ ) {
30+
out = stdlib_base_float32_exponent( x[ i ] );
31+
printf( "%f => out: %" PRId32 "\n", x[ i ], out );
32+
}
3333
}

lib/node_modules/@stdlib/stats/base/dists/laplace/entropy/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', function test
7777
t.end();
7878
});
7979

80-
tape( 'the function returns the excess entropy of a Laplace distribution', function test( t ) {
80+
tape( 'the function returns the differential entropy of a Laplace distribution', function test( t ) {
8181
var expected;
8282
var delta;
8383
var tol;

lib/node_modules/@stdlib/stats/base/dists/laplace/entropy/test/test.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ tape( 'if provided a nonpositive `b`, the function returns `NaN`', opts, functio
8686
t.end();
8787
});
8888

89-
tape( 'the function returns the excess entropy of a Laplace distribution', opts, function test( t ) {
89+
tape( 'the function returns the differential entropy of a Laplace distribution', opts, function test( t ) {
9090
var expected;
9191
var delta;
9292
var tol;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ for ( i = 0; i < 10; i++ ) {
169169

170170
#### stdlib_base_dists_triangular_median( a, b, c )
171171

172-
Evaluates the [median][median] for a [triangular][triangular-distribution] distribution with parameters `a` (lower limit), `b` (upper limit) and `c` (mode).
172+
Returns the [median][median] of a [triangular][triangular-distribution] distribution with parameters `a` (minimum support), `b` (maximum support), and `c` (mode).
173173

174174
```c
175175
double out = stdlib_base_dists_triangular_median( 0.0, 1.0, 0.8 );
@@ -178,8 +178,8 @@ double out = stdlib_base_dists_triangular_median( 0.0, 1.0, 0.8 );
178178

179179
The function accepts the following arguments:
180180

181-
- **a**: `[in] double` lower limit.
182-
- **b**: `[in] double` upper limit.
181+
- **a**: `[in] double` minimum support.
182+
- **b**: `[in] double` maximum support.
183183
- **c**: `[in] double` mode.
184184

185185
```c

lib/node_modules/@stdlib/stats/base/dists/triangular/median/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ var pkg = require( './../package.json' ).name;
3232

3333
// VARIABLES //
3434

35-
var pdf = tryRequire( resolve( __dirname, './../lib/native.js' ) );
35+
var median = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3636
var opts = {
37-
'skip': ( pdf instanceof Error )
37+
'skip': ( median instanceof Error )
3838
};
3939

4040

@@ -60,7 +60,7 @@ bench( pkg+'::native', opts, function benchmark( b ) {
6060

6161
b.tic();
6262
for ( i = 0; i < b.iterations; i++ ) {
63-
y = pdf( min[ i % len ], max[ i % len ], mode[ i % len ] );
63+
y = median( min[ i % len ], max[ i % len ], mode[ i % len ] );
6464
if ( isnan( y ) ) {
6565
b.fail( 'should not return NaN' );
6666
}

lib/node_modules/@stdlib/stats/base/dists/triangular/median/include/stdlib/stats/base/dists/triangular/median.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 median for a triangular distribution with minimum support `a` and maximum support `b` with mode `c`.
30+
* Returns the median of a triangular distribution.
3131
*/
3232
double stdlib_base_dists_triangular_median( const double a, const double b, const double c );
3333

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ for ( i = 0; i < 10; i++ ) {
172172

173173
#### stdlib_base_dists_weibull_mean( k, lambda )
174174

175-
Evaluates the mean for an weibull distribution.
175+
Returns the [expected value][expected-value] of a [Weibull][weibull-distribution] distribution with parameters `k` (shape parameter) and `lambda` (scale parameter).
176176

177177
```c
178178
double out = stdlib_base_dists_weibull_mean( 4.0, 12.0 );
@@ -182,10 +182,10 @@ double out = stdlib_base_dists_weibull_mean( 4.0, 12.0 );
182182
The function accepts the following arguments:
183183

184184
- **k**: `[in] double` shape parameter.
185-
- **λ**: `[in] double` scale parameter.
185+
- **lambda**: `[in] double` scale parameter.
186186

187187
```c
188-
double stdlib_base_dists_weibull_mean( const double k, const double λ );
188+
double stdlib_base_dists_weibull_mean( const double k, const double lambda );
189189
```
190190
191191
</section>

lib/node_modules/@stdlib/stats/base/dists/weibull/mean/include/stdlib/stats/base/dists/weibull/mean.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-
* Returns the mean of an weibull distribution.
30+
* Returns the expected value of a Weibull distribution.
3131
*/
3232
double stdlib_base_dists_weibull_mean( const double k, const double lambda );
3333

0 commit comments

Comments
 (0)