|
SSJ V. 1.2.5. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.rng.RandomStreamBase
umontreal.iro.lecuyer.rng.MT19937
public class MT19937
Implements the RandomStream interface via inheritance from
RandomStreamBase. The backbone generator is the MT19937
Mersenne Twister, proposed by Matsumoto and Nishimura, which has a state size of 19937 bits and a period length of
approximatively 219937.
Each instance uses another RandomStream to fill its initial state.
With this design, the initial states of successive streams are not
spaced by an equal number of steps, and there is no guarantee that
different streams do not overlap, but damaging overlap is unlikely
because of the huge size of the state space.
The seed of the RNG, and the state of a stream at any given
step, is a 624-dimensional vector of 32-bit integers.
The output of nextValue has 32 bits of precision.
| Constructor Summary | |
|---|---|
MT19937(RandomStream rng)
Constructs a new stream, using rng to fill its initial state. |
|
MT19937(RandomStream rng,
String name)
Constructs a new stream with the identifier name (used in the toString method). |
|
| Method Summary | |
|---|---|
void |
resetNextSubstream()
Reinitializes the stream to the beginning of its next substream: Ng is computed, and Cg and Bg are set to Ng. |
void |
resetStartStream()
Reinitializes the stream to its initial state Ig: Cg and Bg are set to Ig. |
void |
resetStartSubstream()
Reinitializes the stream to the beginning of its current substream: Cg is set to Bg. |
String |
toString()
Returns a string containing the current state of this stream. |
| Methods inherited from class umontreal.iro.lecuyer.rng.RandomStreamBase |
|---|
formatState, formatStateFull, increasedPrecision, nextArrayOfDouble, nextArrayOfInt, nextDouble, nextInt |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MT19937(RandomStream rng)
rng - used to build the seed
public MT19937(RandomStream rng,
String name)
rng - used to build the seedname - name of the stream| Method Detail |
|---|
public void resetStartStream()
RandomStream
resetStartStream in interface RandomStreamresetStartStream in class RandomStreamBasepublic void resetStartSubstream()
RandomStream
resetStartSubstream in interface RandomStreamresetStartSubstream in class RandomStreamBasepublic void resetNextSubstream()
RandomStream
resetNextSubstream in interface RandomStreamresetNextSubstream in class RandomStreamBasepublic String toString()
RandomStream
toString in interface RandomStreamtoString in class RandomStreamBase
|
SSJ V. 1.2.5. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||