onemkl::rng::uniform (Continuous)¶
Generates random numbers with uniform distribution.
Syntax
template<typename T = float, method Method = standard>
class uniform {
public:
uniform(): uniform((T)0.0, (T)1.0){}
uniform(Ta, 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 class object is used in onemkl::rng::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:

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