Generates random numbers with uniform distribution.
template<typename Type = float, typename Method =
mkl::rng::device::uniform_method::by_default> class uniform {
public:
using method_type = Method;
using result_type = Type;
uniform(): uniform((Type)0.0, (Type)1.0){}
explicit uniform(Type a, Type b);
Type a() const;
Type b() const;
};
mkl_rng_sycl_device.hpp
The class object is used in the mkl::rng::device::generate function to provide random numbers uniformly distributed over the interval [a, b), where a, b are the left and right bounds of the interval, respectively, and a, b∈R ; a < b.
The probability density function is given by:
The cumulative distribution function is as follows:
typename Type = float |
Type of the produced values. The specific values are as follows: float double |
typename Method = mkl::rng::device::uniform_method::by_default |
Generation method. The specific values are as follows: mkl::rng::device::uniform_method::standard mkl::rng::device::uniform_method::standard_accurate See brief descriptions of the methods in Distributions Template Parameter Method Values |
Name |
Type |
Description |
---|---|---|
a |
Type (float, double) |
Left bound a |
b |
Type (float, double) |
Right bound b |