|
typedef mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx > | _Myt |
|
typedef _Ty | 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>
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 |
( |
unsigned long |
_X0 = default_seed , |
|
|
_Ty |
_Dxarg = _WMSK , |
|
|
_Ty |
_Fxarg = (_Ty)1812433253 |
|
) |
| |
|
inlineexplicit |
void seed(unsigned long _X0=default_seed, _Ty _Fx=(_Ty) 1812433253)
Definition: random:1376
_Ty _Dxval
Definition: random:1476
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 |
( |
const mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx > & |
_Right | ) |
|
|
inline |
const _Ty & _Right
Definition: algorithm:4087
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 |
( |
mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx > & |
_Right | ) |
|
|
inline |
const _Ty & _Right
Definition: algorithm:4087
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 >
mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::mersenne_twister |
( |
_Gen & |
_Gx | ) |
|
|
inlineexplicit |
void seed(unsigned long _X0=default_seed, _Ty _Fx=(_Ty) 1812433253)
Definition: random:1376
static const _Ty _WMSK
Definition: random:1478
_Ty _Dxval
Definition: random:1476
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 |
1442 for (_Ix = 0; _Ix < _Nx - _Mx; ++_Ix)
1444 _Ty _Tmp = (this->
_Ax[_Ix + _Nx] &
_HMSK)
1445 | (this->
_Ax[_Ix + _Nx + 1] &
_LMSK);
1446 this->
_Ax[_Ix] = (_Tmp >> 1)
1447 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix + _Nx + _Mx];
1450 for (; _Ix < _Nx - 1; ++_Ix)
1452 _Ty _Tmp = (this->
_Ax[_Ix +_Nx] &
_HMSK)
1453 | (this->
_Ax[_Ix + _Nx + 1] &
_LMSK);
1454 this->
_Ax[_Ix] = (_Tmp >> 1)
1455 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix - _Nx + _Mx];
1459 this->
_Ax[_Ix] = (_Tmp >> 1)
1460 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Mx - 1];
unsigned int _Idx
Definition: random:777
_Ty _Ax[2 *_Nw]
Definition: random:778
static const _Ty _HMSK
Definition: random:1479
static const _Ty _LMSK
Definition: random:1480
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 |
1467 for (_Ix = _Nx; _Ix < 2 * _Nx; ++_Ix)
1469 _Ty _Tmp = (this->
_Ax[_Ix - _Nx] &
_HMSK)
1470 | (this->
_Ax[_Ix - _Nx + 1] &
_LMSK);
1471 this->
_Ax[_Ix] = (_Tmp >> 1)
1472 ^ (_Tmp & 1 ? _Px : 0) ^ this->
_Ax[_Ix - _Nx + _Mx];
_Ty _Ax[2 *_Nw]
Definition: random:778
static const _Ty _HMSK
Definition: random:1479
static const _Ty _LMSK
Definition: random:1480
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 |
1399 for (
int _Ix = 0; _Ix < _Nx; ++_Ix)
1400 _Ostr << this->
_At(_Ix) <<
' ';
_Ty _At(int _Ix) const
Definition: random:723
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 |
1431 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 const _Ty _WMSK
Definition: random:1478
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 |
1416 if (this->
_Idx == _Nx)
1418 else if (2 * _Nx <= this->
_Idx)
1421 _Ty _Res = this->
_Ax[this->_Idx++] &
_WMSK;
1422 _Res ^= (_Res >> _Ux) &
_Dxval;
1423 _Res ^= (_Res << _Sx) & _Bx;
1424 _Res ^= (_Res << _Tx) & _Cx;
1425 _Res ^= (_Res &
_WMSK) >> _Lx;
void _Refill_upper()
Definition: random:1464
unsigned int _Idx
Definition: random:777
_Ty _Ax[2 *_Nw]
Definition: random:778
static const _Ty _WMSK
Definition: random:1478
_Ty _Dxval
Definition: random:1476
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 |
( |
unsigned long |
_X0 = default_seed , |
|
|
_Ty |
_Fx = (_Ty)1812433253 |
|
) |
| |
|
inline |
1379 _Ty _Prev = this->
_Ax[0] = _X0 &
_WMSK;
1380 for (
int _Ix = 1; _Ix < _Nx; ++_Ix)
1381 _Prev = this->
_Ax[_Ix] =
1382 (_Ix + _Fx * (_Prev ^ (_Prev >> (_Wx - 2)))) &
_WMSK;
unsigned int _Idx
Definition: random:777
_Ty _Ax[2 *_Nw]
Definition: random:778
static const _Ty _WMSK
Definition: random:1478
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 >
void mersenne_twister< _Ty, _Wx, _Nx, _Mx, _Rx, _Px, _Ux, _Sx, _Bx, _Tx, _Cx, _Lx >::seed |
( |
_Gen & |
_Gx, |
|
|
bool |
= false |
|
) |
| |
|
inline |
1389 for (
int _Ix = 0; _Ix < _Nx; ++_Ix)
unsigned int _Idx
Definition: random:777
_Ty _Ax[2 *_Nw]
Definition: random:778
static const _Ty _WMSK
Definition: random:1478
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>
const _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>
const _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>
const _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>
const _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>
const 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>
const _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>
const _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>
const 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>
const 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>
const 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>
const 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>
const _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>
const 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>
const 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>
const 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: