Skip to content

Commit d56366e

Browse files
committed
docs: update examples and fix docs
--- 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: passed - 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 ---
1 parent 5a1340e commit d56366e

File tree

2 files changed

+12
-29
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/quantile

2 files changed

+12
-29
lines changed

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

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,14 @@ y = myQuantile( 0.3 );
141141
```javascript
142142
var uniform = require( '@stdlib/random/array/uniform' );
143143
var EPS = require( '@stdlib/constants/float64/eps' );
144+
var logEachMap = require( '@stdlib/console/log-each-map' );
144145
var quantile = require( '@stdlib/stats/base/dists/kumaraswamy/quantile' );
145146

146-
var a;
147-
var b;
148-
var p;
149-
var y;
150-
var i;
147+
var p = uniform( 10, 0.0, 1.0 );
148+
var a = uniform( 10, EPS, 5.0 );
149+
var b = uniform( 10, EPS, 5.0 );
151150

152-
p = uniform( 10, 0.0, 1.0 );
153-
a = uniform( 10, EPS, 5.0 );
154-
b = uniform( 10, EPS, 5.0 );
155-
156-
for ( i = 0; i < p.length; i++ ) {
157-
y = quantile( p[ i ], a[ i ], b[ i ] );
158-
console.log( 'p: %d, a: %d, b: %d, Q(p;a,b): %d', p[ i ].toFixed( 4 ), a[ i ].toFixed( 4 ), b[ i ].toFixed( 4 ), y.toFixed( 4 ) );
159-
}
151+
logEachMap( 'p: %d, a: %d, b: %d, Q(p;a,b): %d', p, a, b, quantile );
160152
```
161153

162154
</section>
@@ -191,7 +183,7 @@ for ( i = 0; i < p.length; i++ ) {
191183

192184
#### stdlib_base_dists_kumaraswamy_quantile( p, a, b )
193185

194-
Evaluates the quantile function of a Kumaraswamy's double bounded distribution.
186+
Evaluates the quantile function of a [Kumaraswamy's double bounded][kumaraswamy-distribution] distribution with parameters `a` (first shape parameter) and `b` (second shape parameter).
195187

196188
```c
197189
double out = stdlib_base_dists_kumaraswamy_quantile( 0.5, 1.0, 1.0 );
@@ -205,8 +197,7 @@ The function accepts the following arguments:
205197
- **b**: `[in] double` second shape parameter.
206198

207199
```c
208-
double stdlib_base_dists_kumaraswamy_quantile( const double p, const
209-
double a, const double b );
200+
double stdlib_base_dists_kumaraswamy_quantile( const double p, const double a, const double b );
210201
```
211202
212203
</section>

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/quantile/examples/index.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,11 @@
2020

2121
var uniform = require( '@stdlib/random/array/uniform' );
2222
var EPS = require( '@stdlib/constants/float64/eps' );
23+
var logEachMap = require( '@stdlib/console/log-each-map' );
2324
var quantile = require( './../lib' );
2425

25-
var a;
26-
var b;
27-
var p;
28-
var y;
29-
var i;
26+
var p = uniform( 10, 0.0, 1.0 );
27+
var a = uniform( 10, EPS, 5.0 );
28+
var b = uniform( 10, EPS, 5.0 );
3029

31-
p = uniform( 10, 0.0, 1.0 );
32-
a = uniform( 10, EPS, 5.0 );
33-
b = uniform( 10, EPS, 5.0 );
34-
35-
for ( i = 0; i < p.length; i++ ) {
36-
y = quantile( p[ i ], a[ i ], b[ i ] );
37-
console.log( 'p: %d, a: %d, b: %d, Q(p;a,b): %d', p[ i ].toFixed( 4 ), a[ i ].toFixed( 4 ), b[ i ].toFixed( 4 ), y.toFixed( 4 ) );
38-
}
30+
logEachMap( 'p: %d, a: %d, b: %d, Q(p;a,b): %d', p, a, b, quantile );

0 commit comments

Comments
 (0)