onemkl::rng::chi_square

Generates chi-square distributed random values.

Syntax

template<typename T = float, method Method =      gamma_marsaglia>
  class chi_square {
  public:
    chi_square(): chi_square(5){}
    chi_square(std::int32_t n)
    chi_square(const chi_square<T, Method>& other)
    std::int32_t n() const
    chi_square<T, Method>& operator=(const chi_square<T, Method>& other)
  }

Include Files

  • mkl_sycl.hpp

Description

The onemkl::rng::chi_square class object is used in the onemkl::rng::generate function to provide random numbers with chi-square distribution and ν degrees of freedom, nN, n > 0.

The probability density function is:

image0

The cumulative distribution function is:

image1

Input Parameters

Name

Type

Description

method

onemkl::rng::method

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

n

std::int32_t

Degrees of freedom.