|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.rng.RandomStreamBase umontreal.iro.lecuyer.rng.MRG32k3a
public class MRG32k3a
Extends the abstract class RandomStreamBase
by using as a
backbone (or main) generator the combined multiple recursive
generator (CMRG) MRG32k3a proposed by L'Ecuyer,
implemented in 64-bit floating-point arithmetic.
This backbone generator has a period length of
ρ = 2191.
The values of V, W, and Z are 251, 276, and 2127,
respectively. (See RandomStream
for their definition.)
The seed of the RNG, and the state of a stream at any given step,
are six-dimensional vectors of 32-bit integers, stored in double.
The default initial seed of the RNG is
(12345, 12345, 12345, 12345, 12345, 12345).
Constructor Summary | |
---|---|
MRG32k3a()
Constructs a new stream, initializes its seed Ig, sets Bg and Cg equal to Ig, and sets its antithetic switch to false. |
|
MRG32k3a(String name)
Constructs a new stream with an identifier name (used when printing the stream state). |
Method Summary | |
---|---|
MRG32k3a |
clone()
Clones the current generator and return its copy. |
long[] |
getState()
Returns the current state Cg of this stream. |
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. |
static void |
setPackageSeed(long[] seed)
Sets the initial seed for the class MRG32k3a to the six integers in the vector seed[0..5]. |
void |
setSeed(long[] seed)
Sets the initial seed Ig of this stream to the vector seed[0..5]. |
String |
toString()
Returns a string containing the name and the current state Cg of this stream. |
String |
toStringFull()
Returns a string containing the name of this stream and the values of all its internal variables. |
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 MRG32k3a()
setPackageSeed
if this is the first stream created,
otherwise it is Z steps ahead of that of the stream most recently
created in this class.
public MRG32k3a(String name)
name
- name of the streamMethod Detail |
---|
public static void setPackageSeed(long[] seed)
seed
- array of 6 elements representing the seedpublic void setSeed(long[] seed)
seed
- array of 6 integers representing the new seedpublic void resetStartStream()
RandomStream
resetStartStream
in interface RandomStream
resetStartStream
in class RandomStreamBase
public void resetStartSubstream()
RandomStream
resetStartSubstream
in interface RandomStream
resetStartSubstream
in class RandomStreamBase
public void resetNextSubstream()
RandomStream
resetNextSubstream
in interface RandomStream
resetNextSubstream
in class RandomStreamBase
public long[] getState()
public String toString()
toString
in interface RandomStream
toString
in class RandomStreamBase
public String toStringFull()
public MRG32k3a clone()
clone
in interface CloneableRandomStream
clone
in class RandomStreamBase
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |