onemkl::rng::laplace

Generates random numbers with Laplace distribution.

Syntax

template<typename T = float, method Method =      inverse_function>
  class laplace {
  public:
    laplace(): laplace((T)0.0, (T)1.0){}
    laplace(T a, T b)
    laplace(const laplace<T, Method>& other)
    T a() const
    T b() const
    laplace<T, Method>& operator=(const laplace<T,      Method>& other)
  }

Include Files

  • mkl_sycl.hpp

Description

The onemkl::rng::laplace class object is used in the onemkl::rng::generate function to provide random numbers with Laplace distribution with mean value (or average) a and scalefactor ( b, β), where a, β∈R ; β > 0. The scalefactor value determines the standard deviation as

image0

The probability density function is given by:


image1

The cumulative distribution function is as follows:


image2

Input Parameters

Name

Type

Description

method

onemkl::rng::method

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

a

T (float, double)

Mean value a.

b

T (float, double)

Scalefactor b.