OpenMPCD
|
The uniform distribution in the left-open interval \( (0, 1] \). More...
#include <Uniform0e1i.hpp>
Public Member Functions | |
template<typename RNG > | |
OPENMPCD_CUDA_DEVICE T | operator() (RNG &rng) const |
Generates a random value sampled from the distribution. More... | |
template<typename RNG > | |
OPENMPCD_CUDA_DEVICE void | operator() (RNG &rng, T *const r1, T *const r2) const |
Generates two random values sampled from the distribution. More... | |
The uniform distribution in the left-open interval \( (0, 1] \).
The value \( 0 \) does not lie within the range of possible values, but \( 1 \) does.
T | The underlying data type, which must be float or double . |
Definition at line 36 of file Uniform0e1i.hpp.
OPENMPCD_CUDA_DEVICE T OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T >::operator() | ( | RNG & | rng | ) | const |
Generates a random value sampled from the distribution.
RNG | The random number generator type. |
[in] | rng | The random number generator instance. |
OPENMPCD_CUDA_DEVICE void OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T >::operator() | ( | RNG & | rng, |
T *const | r1, | ||
T *const | r2 | ||
) | const |
Generates two random values sampled from the distribution.
RNG | The random number generator type. |
[in] | rng | The random number generator instance. |
[out] | r1 | Pointer to where the first random number should be stored; must not be nullptr . |
[out] | r2 | Pointer to where the second random number should be stored; must not be nullptr . |