template<typename Packet, int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
class Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >
A vectorized version of Mersenne Twister Engine.
- Template Parameters
-
| Packet | a type of integer packet being generated from this engine |
| _Nx | |
| _Mx | |
| _Rx | |
| _Px | |
| _Ux | |
| _Dx | |
| _Sx | |
| _Bx | |
| _Tx | |
| _Cx | |
| _Lx | |
| _Fx | |
- Note
- It is recommended to use the alias, Eigen::Rand::Vmt19937_64 rather than using raw MersenneTwister template class because the definition of Eigen::Rand::Vmt19937_64 is changed to use the appropriate PacketType depending on compile options and the architecture of machines.
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::MersenneTwister |
( |
uint64_t |
x0 = default_seed | ) |
|
|
inline |
Construct a new Mersenne Twister engine with a scalar seed.
- Parameters
-
| x0 | scalar seed for the engine |
- Note
- The seed for the first element of packet is initialized to
x0, for the second element to x0 + 1, and the n-th element to is x0 + n - 1.
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::MersenneTwister |
( |
Packet |
x0 | ) |
|
|
inline |
Construct a new Mersenne Twister engine with a packet seed.
- Parameters
-
| x0 | packet seed for the engine |
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| void Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::discard |
( |
unsigned long long |
num | ) |
|
|
inline |
Discards num items being generated.
- Parameters
-
| num | the number of items being discarded |
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| static constexpr uint64_t Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::max |
( |
| ) |
|
|
inlinestaticconstexpr |
maximum value of the result
- Returns
- uint64_t
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| static constexpr uint64_t Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::min |
( |
| ) |
|
|
inlinestaticconstexpr |
minimum value of the result
- Returns
- uint64_t
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| result_type Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::operator() |
( |
| ) |
|
|
inline |
Generates one random packet and advance the internal state.
- Returns
- result_type
- Note
- A value generated from this engine is not scalar, but packet type. If you need to extract scalar values, use Eigen::Rand::makeScalarRng or Eigen::Rand::PacketRandomEngineAdaptor.
template<typename Packet , int _Nx, int _Mx, int _Rx, uint64_t _Px, int _Ux, uint64_t _Dx, int _Sx, uint64_t _Bx, int _Tx, uint64_t _Cx, int _Lx, uint64_t _Fx>
| void Eigen::Rand::MersenneTwister< Packet, _Nx, _Mx, _Rx, _Px, _Ux, _Dx, _Sx, _Bx, _Tx, _Cx, _Lx, _Fx >::seed |
( |
Packet |
x0 | ) |
|
|
inline |
initialize the engine with a given seed
- Parameters
-
| x0 | packet seed for the engine |