Skip to content

Commit f014eb0

Browse files
fix: updated README.md
--- 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: 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 --- --- 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: passed - 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: passed - 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 ---
1 parent 783ef4f commit f014eb0

File tree

1 file changed

+95
-3
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/gumbel/quantile

1 file changed

+95
-3
lines changed

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

Lines changed: 95 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,105 @@ for ( i = 0; i < 100; i++ ) {
148148

149149
<!-- /.examples -->
150150

151-
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
151+
<!-- 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. -->
152152

153-
<section class="related">
153+
<section class="references">
154+
155+
<!-- C interface documentation. -->
156+
157+
* * *
158+
159+
<section class="c">
160+
161+
## C APIs
162+
163+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
164+
165+
<section class="intro">
166+
167+
</section>
168+
169+
<!-- /.intro -->
170+
171+
<!-- C usage documentation. -->
172+
173+
<section class="usage">
174+
175+
### Usage
176+
177+
```c
178+
#include "stdlib/stats/base/dists/gumbel/quantile.h"
179+
```
180+
181+
#### stdlib_base_dists_gumbel_quantile( p, mu, beta )
182+
183+
<!-- Evaluates the [probability density function][pdf] (PDF) of a [lognormal][lognormal-distribution] distribution with parameters input value `x`, location parameter `mu` and scale parameter `beta`. -->
184+
185+
Evaluates the [quantile-function][quantile-function] of a [gumbel-distribution][gumbel-distribution] with parameter probability `p`, location parameter `mu` and scale parameter `beta`.
186+
187+
```c
188+
double y = stdlib_base_dists_gumbel_quantile( 0.8, 0.0, 1.0 );
189+
// returns ~1.5
190+
```
191+
192+
The function accepts the following arguments:
193+
194+
- **p**: `[in] double` probability
195+
- **mu**: `[in] double` location parameter.
196+
- **beta**: `[in] double` scale parameter.
197+
198+
```c
199+
double stdlib_base_dists_gumbel_quantile( const double p, const double mu, const double beta );
200+
```
201+
202+
</section>
203+
204+
<!-- /.usage -->
205+
206+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
207+
208+
<section class="notes">
209+
210+
</section>
211+
212+
<!-- /.notes -->
213+
214+
<!-- C API usage examples. -->
215+
216+
<section class="examples">
217+
218+
### Examples
219+
220+
```c
221+
#include "stdlib/stats/base/dists/gumbel/quantile.h"
222+
#include <stdlib.h>
223+
#include <stdio.h>
224+
225+
static double random_uniform( const double min, const double max ) {
226+
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
227+
return min + ( v*(max-min) );
228+
}
229+
230+
int main( void ) {
231+
double p;
232+
double mu;
233+
double beta;
234+
double y;
235+
int i;
236+
237+
for ( i = 0; i < 25; i++ ) {
238+
p = random_uniform( 0.0, 1.0 );
239+
mu = random_uniform( 0.0, 10.0 ) - 5.0;
240+
beta = random_uniform( 0.0, 20.0 );
241+
y = stdlib_base_dists_gumbel_quantile( p, mu, beta );
242+
printf( "p: %lf, mu: %lf, beta: %lf, Q(p;mu,beta): %lf\n", p, mu, beta, y );
243+
}
244+
}
245+
```
154246

155247
</section>
156248

157-
<!-- /.related -->
249+
<!-- /.references -->
158250

159251
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
160252

0 commit comments

Comments
 (0)