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 9913b84c71f8..da4a1ec94720 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 @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2018 The Stdlib Authors. +Copyright (c) 2026 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -160,6 +160,103 @@ logEachMap( 'x: %0.4f, a: %0.4f, b: %0.4f, f(x;a,b): %0.4f', x, a, b, pdf ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/kumaraswamy/pdf.h" +``` + +#### stdlib_base_dists_kumaraswamy_pdf( x, a, b ) + +Evaluates the probability distribution function (PDF) for a Kumaraswamy's double bounded distribution. + +```c +double out = stdlib_base_dists_kumaraswamy_pdf( 0.5, 1.0, 1.0 ); +// returns 1.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_pdf( const double x, const double a, const double b ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/kumaraswamy/pdf.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_pdf( x, a, b ); + printf( "x: %lf, a: %lf, b: %lf, f(x;a,b): %lf\n", x, a, b, y ); + } +} +``` + +
+ + + +
+ + +