onemkl::rng::uniform (Discrete)¶
Generates random numbers uniformly distributed over the interval
[a, b)
.
Syntax
template<typename T = float, method Method = standard>
class uniform {
public:
uniform(): uniform((T)0.0, (T)1.0){}
uniform(T a, T b)
uniform(const uniform<T, Method>& other)
T a() const
T b() const
uniform<T, Method>& operator=(const uniform<T, Method>& other)
}
Include Files
mkl_sycl.hpp
Description
The onemkl::rng::uniform class object is used in onemkl::rng::generate
functions 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∈Z; a < b
.
The probability distribution is given by:

The cumulative distribution function is as follows:

Input Parameters
Name |
Type |
Description |
---|---|---|
a |
|
Left bound |
b |
|
Right bound |
Parent topic: Distributions