onemkl::rng::gaussian¶
Generates normally distributed random numbers.
Syntax
template<typename T = float, method Method = box_muller2>
class gaussian {
public:
gaussian(): gaussian((T)0.0, (T)1.0){}
gaussian(T mean, T stddev)
gaussian(const gaussian<T, Method>& other)
T mean() const
T stddev() const
gaussian<T, Method>& operator=(const gaussian<T, Method>& other)
}
Include Files
mkl_sycl.hpp
Description
The class object is used in onemkl::rng::generate function to provide
random numbers with normal (Gaussian) distribution with mean
(a
) and standard deviation (stddev, σ
), where a
,
σ ∈ R
; σ
> 0.
The probability density function is given by:

The cumulative distribution function is as follows:

The cumulative distribution function Fa,σ(x)
can be expressed
in terms of standard normal distribution Φ(x)
as
F
a,σ
(x) = Φ((x - a)/σ)
Input Parameters
Name |
Type |
Description |
---|---|---|
method |
|
Generation method. The specific values are as follows: |
mean |
|
Mean value |
stddev |
|
Standard deviation σ. |
Parent topic: Distributions