|
| template<typename UIntType , typename RealType , typename Lower , typename Upper > |
| RealType | mckl::u01 (UIntType u) |
| | Convert uniform unsigned integers to floating points within [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType , typename Lower , typename Upper > |
| void | mckl::u01 (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform unsigned integers to floating points within [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType , std::size_t M> |
| RealType | mckl::u01_canonical (const UIntType *u) |
| | Convert uniform multiple unsigned integers to one floating points within [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType , std::size_t M> |
| void | mckl::u01_canonical (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform multiple unsigned integers to one floating points within [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType > |
| RealType | mckl::u01_cc (UIntType u) |
| | Convert uniform unsigned integers to floating points on [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType > |
| void | mckl::u01_cc (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform unsigned integers to floating points on [0, 1]. More...
|
| |
| template<typename UIntType , typename RealType > |
| RealType | mckl::u01_co (UIntType u) |
| | Convert uniform unsigned integers to floating points on [0, 1) More...
|
| |
| template<typename UIntType , typename RealType > |
| void | mckl::u01_co (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform unsigned integers to floating points on [0, 1) More...
|
| |
| template<typename UIntType , typename RealType > |
| RealType | mckl::u01_oc (UIntType u) |
| | Convert uniform unsigned integers to floating points on (0, 1]. More...
|
| |
| template<typename UIntType , typename RealType > |
| void | mckl::u01_oc (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform unsigned integers to floating points on (0, 1]. More...
|
| |
| template<typename UIntType , typename RealType > |
| RealType | mckl::u01_oo (UIntType u) |
| | Convert uniform unsigned integers to floating points on (0, 1) More...
|
| |
| template<typename UIntType , typename RealType > |
| void | mckl::u01_oo (std::size_t n, const UIntType *u, RealType *r) |
| | Convert uniform unsigned integers to floating points on (0, 1) More...
|
| |
Converting random integers to uniform floating points.
template<typename UIntType , typename RealType , typename Lower , typename Upper >
| RealType mckl::u01 |
( |
UIntType |
u | ) |
|
|
inline |
Convert uniform unsigned integers to floating points within [0, 1].
Let \(W\) be the number of digits of unsigned integer type UIntType. Assuming the input is a uniform random number on the set \(\{0,1,\dots,2^W - 1\), the output is uniform over the interval \([0,1]\) or one of its (half-)open interval variant. The exact output depend on the template parameter Lower and Upper.
Definition at line 88 of file u01.hpp.