< xoshiro256**
More...
#include <ADS/numeric/RandomGenerators.h>
|
| constexpr | WyRand (std::uint64_t seed=1) |
| | < the type of the numbers
|
| constexpr std::uint64_t | operator() (void) |
| | the next number
|
| bool | operator== (const WyRand &) const =default |
| | true if the two states are equal
|
|
| static constexpr std::uint64_t | min (void) |
| | the least number, 0
|
| static constexpr std::uint64_t | max (void) |
| | the largest number, \( 2^{64} - 1 \)
|
< xoshiro256**
wyrand, a std::uniform_random_bit_generator of 64 bits
◆ result_type
◆ WyRand()
| ADS::WyRand::WyRand |
( |
std::uint64_t | seed = 1 | ) |
|
|
inlineexplicitconstexpr |
< the type of the numbers
the generator whose Weyl sequence starts at the seed
◆ max()
| constexpr std::uint64_t ADS::WyRand::max |
( |
void | | ) |
|
|
inlinestaticconstexpr |
the largest number, \( 2^{64} - 1 \)
◆ min()
| constexpr std::uint64_t ADS::WyRand::min |
( |
void | | ) |
|
|
inlinestaticconstexpr |
◆ operator()()
| std::uint64_t ADS::WyRand::operator() |
( |
void | | ) |
|
|
constexpr |
the next number
In pseudocode (Wang Yi, beyond the book), \( c \) and \( c' \) two constants of 64 bits, \( c \) odd:
\[\class{pseudocode}{\begin{array}{r@{\quad}l}
1 & \textbf{function}\ \mathrm{next}() \cr
2 & \quad s \gets s + c \bmod 2^{64} \cr
3 & \quad ( h , l ) \gets \text{the high and the low word of } s ( s
\oplus c' ) \cr
4 & \quad \textbf{return}\ h \oplus l
\end{array}}
\]
◆ operator==()
| bool ADS::WyRand::operator== |
( |
const WyRand & | | ) |
const |
|
default |
true if the two states are equal
The documentation for this class was generated from the following file: