|
| | MersenneTwister () |
| | Constructor with seed initialization from the seed() method.
|
| | MersenneTwister (UIntType value) |
| | Constructor with initialization of the seed array from the value value. The call to the seed(value) method is performed.
|
| template<class It> |
| | MersenneTwister (It &first, It last) |
| | Constructor with initialization of the seed array from the seed(first,last) method.
|
| template<class Generator> |
| | MersenneTwister (Generator &gen) |
| | Constructor with initialization of the seed array from the generator gen. gen must contain the () operator which must return a value of type UIntType.
|
| void | seed () |
| | Initialization of the seed array. The call to the seed(5489) method is performed.
|
| void | seed (UIntType value) |
| | Initialization of the seed array from the value value. The seed array of this generator consists of n elements.
|
| void | seed (UIntType *state) |
| | Initialization of the seed array from the array state. state must be an array of n elements.
|
| template<class Generator> |
| void | seed (Generator &gen) |
| | Initialization of the seed array from the generator gen. gen is a class that must contain the () operator returning a value of type UIntType.
|
| UIntType | getState (Integer j) |
| | Method that returns the generator state for index j. The complete state of the generator is given by the values of index j between 0 and n (0 < j <= n).
|
| result_type | min () const |
| | min() returns the minimum possible value of a sequence.
|
| result_type | max () const |
| | max() returns the maximum possible value of a sequence.
|
| result_type | operator() () |
| | Overriding the () operator which returns the pseudo random value of the generator. The generator state is modified.
|
| bool | operator== (const MersenneTwister &rhs) const |
| | Overriding the == operator.
|
| bool | operator!= (const MersenneTwister &rhs) const |
| | Overriding the != operator.
|
template<class UIntType,
Integer w,
Integer n,
Integer m,
Integer r, UIntType a,
Integer u,
Integer s, UIntType b,
Integer t, UIntType c,
Integer l, UIntType val>
class Arcane::random::MersenneTwister< UIntType, w, n, m, r, a, u, s, b, t, c, l, val >
MersenneTwister class pattern.
It allows defining classes of Mersenne Twister type generators based on the parameters w,n,m,r,a,u s,b,t,c and l. The generated pseudo-random numbers are of type UIntType. The generation of these numbers is done by calling the () operator. The state of the generator is defined by a private member x[] of the class, which is a array of 2*n dimensions. The seed (initial state of the generator) can be initialized by calling the constructors or the various seed methods available.
Definition at line 47 of file MersenneTwister.h.
template<class UIntType,
Integer w,
Integer n,
Integer m,
Integer r, UIntType a,
Integer u,
Integer s, UIntType b,
Integer t, UIntType c,
Integer l, UIntType val>
| UIntType Arcane::random::MersenneTwister< UIntType, w, n, m, r, a, u, s, b, t, c, l, val >::compute |
( |
UIntType | index | ) |
const |
|
inlineprivate |
Private method that returns the generator state for index index.
- Author
- Patrick Rathouit (origin BOOST library)
- Date
- 28/07/2006
Definition at line 282 of file MersenneTwister.h.
Referenced by Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::operator==().
template<class UIntType,
Integer w,
Integer n,
Integer m,
Integer r, UIntType a,
Integer u,
Integer s, UIntType b,
Integer t, UIntType c,
Integer l, UIntType val>
| void Arcane::random::MersenneTwister< UIntType, w, n, m, r, a, u, s, b, t, c, l, val >::seed |
( |
| ) |
|
|
inline |
Initialization of the seed array. The call to the seed(5489) method is performed.
- Author
- Patrick Rathouit (origin BOOST library)
- Date
- 28/07/2006
Definition at line 124 of file MersenneTwister.h.
Referenced by Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::MersenneTwister(), Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::MersenneTwister(), Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::MersenneTwister(), Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::MersenneTwister(), and Arcane::random::MersenneTwister< UInt32, 32, 351, 175, 19, 0xccab8ee7, 11, 7, 0x31b6ab00, 15, 0xffe50000, 17, 0xa37d3c92 >::seed().