63 typedef std::linear_congruential_engine
81 static constexpr uint64_t convert(uint32_t
x)
noexcept 83 return (static_cast<uint64_t>(
x) << 16) | 0x330e;
100 engine_(convert(val))
107 static constexpr uint32_t
min() {
return 0; }
110 static constexpr uint32_t
max() {
return 0x7FFFFFFF; }
115 engine_.seed(convert(val));
137 return static_cast<uint32_t
>(engine_() >> 17);
void discard(unsigned long long z)
Advance the state of the generator by z notches.
uint64_t raw()
Get the next random number in the sequence and return its raw 48-bit value.
static constexpr result_type default_seed
The default seed.
Rand48(uint32_t val=default_seed)
Construct with specified or default seed.
static constexpr uint32_t min()
The smallest value that the generator can produce.
A pseudo random number generator using the linear congruential algorithm with the following parameter...
uint32_t result_type
The type of the generated random value.
uint32_t operator()()
Get the next random number in the sequence.
static constexpr uint32_t max()
The largest value that the generator can produce.
void seed(uint32_t val=default_seed)
Reseed the generator.