the generator \( X_{n+1} = ( a X_n + c ) \bmod m \) of LinearCongruential with \( a , c , m \) fixed at compile time, \( m = 0 \) meaning \( 2^{64} \): a UniformRandomBitGenerator, as min() and max() are constant
More...
#include <ADS/numeric/RandomNumbers.h>
|
| using | result_type = std::uint64_t |
| | the type of the numbers
|
|
| constexpr | LinearCongruentialT (std::uint64_t seed=1) |
| | the generator from \( X_0 = \mathit{seed} \)
|
| constexpr std::uint64_t | operator() (void) |
| | the next number, \( X_{n+1} = ( a X_n + c ) \bmod m \)
|
| bool | operator== (const LinearCongruentialT &) const =default |
| | whether the two generators are in the same state
|
|
| static constexpr std::uint64_t | min (void) |
| | the least number, 1 if \( c = 0 \), 0 otherwise
|
| static constexpr std::uint64_t | max (void) |
| | the largest number, \( m - 1 \)
|
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
class ADS::LinearCongruentialT< a, c, m >
the generator \( X_{n+1} = ( a X_n + c ) \bmod m \) of LinearCongruential with \( a , c , m \) fixed at compile time, \( m = 0 \) meaning \( 2^{64} \): a UniformRandomBitGenerator, as min() and max() are constant
◆ result_type
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
◆ LinearCongruentialT()
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
the generator from \( X_0 = \mathit{seed} \)
- Precondition
- \( m = 0 \) or \( \mathit{seed} < m \)
◆ max()
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
the largest number, \( m - 1 \)
◆ min()
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
the least number, 1 if \( c = 0 \), 0 otherwise
◆ operator()()
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
the next number, \( X_{n+1} = ( a X_n + c ) \bmod m \)
◆ operator==()
template<std::uint64_t a, std::uint64_t c, std::uint64_t m>
whether the two generators are in the same state
The documentation for this class was generated from the following file: