class
<random>
std::mt19937_64
typedef mersenne_twister_engine<uint_fast64_t, 64,312,156,31,0xb5026f5aa96619e9, 29,0x5555555555555555, 17,0x71d67fffeda60000, 37,0xfff7eee000000000, 43,6364136223846793005> mt19937_64;
Mersenne Twister 19937 generator (64 bit)
A Mersenne Twister pseudo-random generator of 64-bit numbers with a state size of 19937 bits.
It is an instantiation of the mersenne_twister_engine with the following template parameters:
parameter | name | value |
UIntType | result type | uint_fast64_t |
w | word size | 64 |
n | state size | 312 |
m | shift size | 156 |
r | mask bits | 31 |
a | XOR mask | 0xb5026f5aa96619e9 |
u | tempering u | 29 |
d | tempering d | 0x5555555555555555 |
s | tempering s | 17 |
b | tempering b | 0x71d67fffeda60000 |
t | tempering t | 37 |
c | tempering c | 0xfff7eee000000000 |
l | tempering l | 43 |
f | initialization multiplier | 6364136223846793005 |
Member types
The following alias is a member type of mt19937_64:
member type | definition | notes |
result_type | uint_fast64_t | The type of the numbers generated. |
Member functions
As a mersenne_twister_engine type, it has the following member functions:
- (constructor)
- Construct mersenne twister engine (public member function)
- min
- Minimum value (public static member function)
- max
- Maximum value (public static member function)
- seed
- Seed engine (public member function)
- operator()
- Generate random number (public member function)
- discard
- Advance internal state (public member function)
Non-member functions
As a mersenne_twister_engine type, the following operator overloads may be applied to it:
- operator<<
- Insert into output stream (function template)
- operator>>
- Extract from input stream (function template)
- relational operators
- Relational operators (function template)
Member constexpr constants
member constant | definition | notes |
word_size | 64 | The number of bits of each word in the state sequence. |
state_size | 312 | The number of elements in the state sequence (degree of recurrence). |
shift_size | 156 | The shift size used on twists to transform the values. |
mask_bits | 31 | The number of bits that mark the separation point of words on each twist. |
xor_mask | 0xb5026f5aa96619e9 | The XOR mask applied as the linear function on each twist. |
tempering_u | 29 | The shift size of parameter u used in the tempering process of the generation algorithm. |
tempering_d | 0x5555555555555555 | The XOR mask used as parameter d in the tempering process of the generation algorithm. |
tempering_s | 17 | The shift size of parameter s used in the tempering process of the generation algorithm. |
tempering_b | 0x71d67fffeda60000 | The XOR mask used as parameter b in the tempering process of the generation algorithm. |
tempering_t | 37 | The shift size of parameter t used in the tempering process of the generation algorithm. |
tempering_c | 0xfff7eee000000000 | The XOR mask used as parameter c in the tempering process of the generation algorithm. |
tempering_l | 43 | The shift size of parameter l used in the tempering process of the generation algorithm. |
initialization_multiplier | 6364136223846793005 | The initialization multiplier used to seed the state sequence when a single value is used as seed. |
default_seed | 5489u | The default seed used on construction or seeding. |