diff --git a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/README.md index b1a43d18ec8f..93cf6c5a3b65 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/logpdf/README.md @@ -174,6 +174,103 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/kumaraswamy/logpdf.h" +``` + +#### stdlib_base_dists_kumaraswamy_logpdf( x, a, b ) + +Evaluates the natural logarithm of the probability distribution function (PDF) for a Kumaraswamy's double bounded distribution. + +```c +double out = stdlib_base_dists_kumaraswamy_logpdf( 0.5, 1.0, 1.0 ); +// returns 0.0 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **a**: `[in] double` first shape parameter. +- **b**: `[in] double` second shape parameter. + +```c +double stdlib_base_dists_kumaraswamy_logpdf( const double x, const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/kumaraswamy/logpdf.h" +#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 x; + double a; + double b; + double y; + int i; + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0, 1.0 ); + a = random_uniform( 0, 5.0 ); + b = random_uniform( 0, 5.0 ); + y = stdlib_base_dists_kumaraswamy_logpdf( x, a, b ); + printf( "x: %lf, a: %lf, b: %lf, ln(f(x;a,b)): %lf\n", x, a, b, y ); + } +} +``` + +
+ + + +
+ + +