onemkl::rng::gamma¶
Generates gamma distributed random values.
Syntax
template<typename T = float, method Method = marsaglia>
class gamma {
public:
gamma(): gamma((T)1.0, (T)0.0, (T)1.0){}
gamma(T alpha, T a, T beta)
gamma(const gamma<T, Method>& other)
T alpha() const
T a() const
T beta() const
gamma<T, Method>& operator=(const gamma<T, Method>& other)
}
Include Files
mkl_sycl.hpp
Description
The onemkl::rng::gamma class object is used in the onemkl::rng::generate
function to provide random numbers with gamma distribution that
has shape parameter α, displacement a
, and scale parameter β,
where α, β, and a∈R ; α > 0, β > 0
.
The probability density function is given by:
where Γ(α) is the complete gamma function.
The cumulative distribution function is as follows:
Input Parameters
Name |
Type |
Description |
---|---|---|
method |
|
Generation method. The specific values are as follows: |
alpha |
|
Shape α |
a |
|
Displacement |
beta |
|
Scalefactor β. |
Parent topic: Distributions