oneapi::mkl::rng::chi_square¶
Generates chi-square distributed random values.
Syntax
template<typename RealType = float, typename Method = chi_square_method::by_default>
class chi_square {
public:
using method_type = Method;
using result_type = RealType;
chi_square(): chi_square(5){}
explicit chi_square(std::int32_t n);
std::int32_t n() const;
};
Devices supported: Host and CPU
Include Files
oneapi/mkl/rng.hpp
Description
The oneapi::mkl::rng::chi_square class object is used in the
oneapi::mkl::rng::generate function to provide random numbers with
chi-square distribution and ν
degrees of freedom, n
∈N,
n
> 0.
The probability density function is:
The cumulative distribution function is:
Template Parameters
|
Type of the produced values. The specific values are as follows: |
---|---|
|
Generation method. The specific values are as follows: |
Input Parameters
Name |
Type |
Description |
---|---|---|
n |
|
Degrees of freedom. |