|
typedef mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx > | _Myt |
|
typedef _Ty | result_type |
|
|
| mersenne_twister (_Ty _X0=default_seed, _Ty _Dxarg=_WMSK, _Ty _Fxarg=(_Ty) 1812433253) |
|
template<class _Gen , class = typename _Enable_if_seed_seq<_Gen, _Myt>::type> |
| mersenne_twister (_Gen &_Gx) |
|
void | seed (_Ty _X0=default_seed, _Ty _Fx=(_Ty) 1812433253) |
|
template<class _Gen , class = typename _Enable_if_seed_seq<_Gen, _Myt>::type> |
void | seed (_Gen &_Gx, bool=false) |
|
template<class _Elem , class _S_Traits > |
basic_ostream< _Elem, _S_Traits > & | _Write (basic_ostream< _Elem, _S_Traits > &_Ostr) const |
|
result_type() | min () const |
|
result_type() | max () const |
|
result_type | operator() () |
|
void | discard (unsigned long long _Nskip) |
|
_Ty | _At (int _Ix) const |
|
bool | _Equals (const _Circ_buf &_Right) const |
|
unsigned int | _Base (int _Ix=0) const |
|
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
typedef mersenne_twister<_Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx> mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_Myt |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
typedef _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::result_type |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::mersenne_twister |
( |
_Ty |
_X0 = default_seed , |
|
|
_Ty |
_Dxarg = _WMSK , |
|
|
_Ty |
_Fxarg = (_Ty)1812433253 |
|
) |
| |
|
inlineexplicit |
void seed(_Ty _X0=default_seed, _Ty _Fx=(_Ty) 1812433253)
Definition: random:1337
_Ty _Dxval
Definition: random:1438
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
template<class _Gen , class = typename _Enable_if_seed_seq<_Gen, _Myt>::type>
mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::mersenne_twister |
( |
_Gen & |
_Gx | ) |
|
|
inlineexplicit |
void seed(_Ty _X0=default_seed, _Ty _Fx=(_Ty) 1812433253)
Definition: random:1337
static constexpr _Ty _WMSK
Definition: random:1440
_Ty _Dxval
Definition: random:1438
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_Post_satisfies_ |
( |
this-> |
_Idx = = 0 | ) |
|
|
inlineprotected |
1404 for (_Ix = 0; _Ix < _Nx - _Mx; ++_Ix)
1406 _Ty _Tmp = (this->
_Ax[_Ix + _Nx] &
_HMSK)
1407 | (this->
_Ax[_Ix + _Nx + 1] &
_LMSK);
1408 this->
_Ax[_Ix] = (_Tmp >> 1)
1409 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix + _Nx + _Mx];
1412 for (; _Ix < _Nx - 1; ++_Ix)
1414 _Ty _Tmp = (this->
_Ax[_Ix +_Nx] &
_HMSK)
1415 | (this->
_Ax[_Ix + _Nx + 1] &
_LMSK);
1416 this->
_Ax[_Ix] = (_Tmp >> 1)
1417 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix - _Nx + _Mx];
1421 this->
_Ax[_Ix] = (_Tmp >> 1)
1422 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Mx - 1];
unsigned int _Idx
Definition: random:754
_Ty _Ax[2 *_Nw]
Definition: random:755
static constexpr _Ty _LMSK
Definition: random:1442
static constexpr _Ty _HMSK
Definition: random:1441
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
void mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_Refill_upper |
( |
| ) |
|
|
inlineprotected |
1429 for (_Ix = _Nx; _Ix < 2 * _Nx; ++_Ix)
1431 _Ty _Tmp = (this->
_Ax[_Ix - _Nx] &
_HMSK)
1432 | (this->
_Ax[_Ix - _Nx + 1] &
_LMSK);
1433 this->
_Ax[_Ix] = (_Tmp >> 1)
1434 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix - _Nx + _Mx];
_Ty _Ax[2 *_Nw]
Definition: random:755
static constexpr _Ty _LMSK
Definition: random:1442
static constexpr _Ty _HMSK
Definition: random:1441
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
template<class _Elem , class _S_Traits >
basic_ostream<_Elem, _S_Traits>& mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_Write |
( |
basic_ostream< _Elem, _S_Traits > & |
_Ostr | ) |
const |
|
inline |
1361 for (
int _Ix = 0; _Ix < _Nx; ++_Ix)
1362 _Ostr << this->
_At(_Ix) <<
' ';
_Ty _At(int _Ix) const
Definition: random:700
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
void mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::discard |
( |
unsigned long long |
_Nskip | ) |
|
|
inline |
1393 for (; 0 < _Nskip; --_Nskip)
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
result_type() mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::max |
( |
| ) |
const |
|
inline |
static constexpr _Ty _WMSK
Definition: random:1440
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
result_type() mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::min |
( |
| ) |
const |
|
inline |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
result_type mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::operator() |
( |
| ) |
|
|
inline |
1378 if (this->
_Idx == _Nx)
1380 else if (2 * _Nx <= this->
_Idx)
1383 _Ty _Res = this->
_Ax[this->_Idx++] &
_WMSK;
1384 _Res ^= (_Res >> _Ux) &
_Dxval;
1385 _Res ^= (_Res << _Sx) & _Bx;
1386 _Res ^= (_Res << _Tx) & _Cx;
1387 _Res ^= (_Res &
_WMSK) >> _Lx;
void _Refill_upper()
Definition: random:1426
unsigned int _Idx
Definition: random:754
_Ty _Ax[2 *_Nw]
Definition: random:755
static constexpr _Ty _WMSK
Definition: random:1440
_Ty _Dxval
Definition: random:1438
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
void mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::seed |
( |
_Ty |
_X0 = default_seed , |
|
|
_Ty |
_Fx = (_Ty)1812433253 |
|
) |
| |
|
inline |
1340 _Ty _Prev = this->
_Ax[0] = _X0 &
_WMSK;
1341 for (
int _Ix = 1; _Ix < _Nx; ++_Ix)
1342 _Prev = this->
_Ax[_Ix] =
1343 (_Ix + _Fx * (_Prev ^ (_Prev >> (_Wx - 2)))) &
_WMSK;
unsigned int _Idx
Definition: random:754
_Ty _Ax[2 *_Nw]
Definition: random:755
static constexpr _Ty _WMSK
Definition: random:1440
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
template<class _Gen , class = typename _Enable_if_seed_seq<_Gen, _Myt>::type>
void mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::seed |
( |
_Gen & |
_Gx, |
|
|
bool |
= false |
|
) |
| |
|
inline |
1351 for (
int _Ix = 0; _Ix < _Nx; ++_Ix)
unsigned int _Idx
Definition: random:754
_Ty _Ax[2 *_Nw]
Definition: random:755
static constexpr _Ty _WMSK
Definition: random:1440
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
_Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_Dxval |
|
protected |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_HMSK = (_WMSK << _Rx) & _WMSK |
|
staticprotected |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_LMSK = ~_HMSK & _WMSK |
|
staticprotected |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::_WMSK = ~((~_Ty(0) << (_Wx - 1)) << 1) |
|
staticprotected |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::default_seed = 5489U |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::mask_bits = _Rx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_b = _Bx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_c = _Cx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_l = _Lx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_s = _Sx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_t = _Tx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::output_u = _Ux |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr _Ty mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::parameter_a = _Px |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::shift_size = _Mx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::state_size = _Nx |
|
static |
template<class _Ty, int _Wx, int _Nx, int _Mx, int _Rx, _Ty _Px, int _Ux, int _Sx, _Ty _Bx, int _Tx, _Ty _Cx, int _Lx>
constexpr int mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::word_size = _Wx |
|
static |
The documentation for this class was generated from the following file: