diff --git a/grass b/grass new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/README.md index f83bf4c4280e..7e81e7f089dd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/pdf/README.md @@ -164,6 +164,105 @@ for ( i = 0; i < 10; i++ ) { + + +
+ + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/kumaraswamy/pdf.h" +``` + +#### stdlib_base_dists_kumaraswamy_pdf( x, alpha, beta ) + +Evaluates the [probability density function][pdf] (PDF) of a [Kumaraswamy][kumaraswamy-distribution] distribution with parameters `alpha` (first shape parameter) and `beta` (second shape parameter). + +```c +double y = stdlib_base_dists_kumaraswamy_pdf( 0.5, 2.0, 1.0 ); +// returns 1.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **alpha**: `[in] double` first shape parameter. +- **beta**: `[in] double` second shape parameter. + +```c +double stdlib_base_dists_kumaraswamy_pdf( const double x, const double alpha, const double beta ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/kumaraswamy/pdf.h" +#include +#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 alpha; + double beta; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.0, 1.0 ); + alpha = random_uniform( 0.1, 10.0 ); + beta = random_uniform( 0.1, 10.0 ); + y = stdlib_base_dists_kumaraswamy_pdf( x, alpha, beta ); + printf( "x: %lf, alpha: %lf, beta: %lf, f(x;alpha,beta): %lf\n", x, alpha, beta, y ); + } +} +``` + +
+ + +