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

Weibull distribution. More...

#include <prrng.h>

Public Member Functions

 weibull_distribution (double k=1, double scale=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

Constructor & Destructor Documentation

◆ weibull_distribution()

prrng::weibull_distribution::weibull_distribution ( double  k = 1,
double  scale = 1 
)
inline

Constructor.

Parameters
kShape parameter \( k \).
scaleScale parameter \( \lambda \).

Definition at line 1517 of file prrng.h.

Member Function Documentation

◆ cdf()

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

Cumulative density function.

\( \Phi(x) = 1 - e^{-(x / \lambda)^k} \)

Parameters
xCoordinates.
Returns
Cumulative density for each x.

Definition at line 1559 of file prrng.h.

◆ pdf()

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

Probability density function.

Parameters
xCoordinates.
Returns
Probability density for each x.

Definition at line 1530 of file prrng.h.

◆ quantile()

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

Quantile (the inverse of the cumulative density function).

For a given probability \( p \) the output is

\( x = \lambda (- \ln (1 - p))^{1 / k}) \)

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

Definition at line 1574 of file prrng.h.


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