prrng 1.12.1
Loading...
Searching...
No Matches
prrng::power_distribution Class Reference

Power distribution. More...

#include <prrng.h>

Public Member Functions

 power_distribution (double k=1)
 Constructor.
 
template<class T >
pdf (const T &x)
 Probability density function.
 
template<class T >
cdf (const T &x)
 Cumulative density function.
 
template<class T >
quantile (const T &p)
 Quantile (the inverse of the cumulative density function).
 

Detailed Description

Power distribution.

\( P(x) = k x^{k - 1} \)

with \( k > 0 \) and \( 0 \leq x \leq 1 \).

References:

Definition at line 1282 of file prrng.h.

Constructor & Destructor Documentation

◆ power_distribution()

prrng::power_distribution::power_distribution ( double  k = 1)
inline

Constructor.

Parameters
kExponent

Definition at line 1289 of file prrng.h.

Member Function Documentation

◆ cdf()

template<class T >
T prrng::power_distribution::cdf ( const T &  x)
inline

Cumulative density function.

Parameters
xCoordinates.
Returns
Cumulative density for each x.

Definition at line 1313 of file prrng.h.

◆ pdf()

template<class T >
T prrng::power_distribution::pdf ( const T &  x)
inline

Probability density function.

Parameters
xCoordinates.
Returns
Probability density for each x.

Definition at line 1301 of file prrng.h.

◆ quantile()

template<class T >
T prrng::power_distribution::quantile ( const T &  p)
inline

Quantile (the inverse of the cumulative density function).

Parameters
pProbability [0, 1].
Returns
Quantile for each p.

Definition at line 1325 of file prrng.h.


The documentation for this class was generated from the following file: