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:


image0

The cumulative distribution function is as follows:


image1

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

onemkl::rng::method

Generation method. The specific values are as follows: onemkl::rng::box_muller onemkl::rng::box_muller2 onemkl::rng::inverse_function See brief descriptions of the methods in Distributions Template Parameter onemkl::rng::method Values.

mean

T (float, double)

Mean value a.

stddev

T (float, double)

Standard deviation σ.