Extends the abstract class RandomStreamBase by using as a backbone (or main) generator the combined multiple recursive generator (CMRG) MRG32k3a
proposed by L’Ecuyer [148] , implemented in 64-bit floating-point arithmetic. More...
false
. More...
name
(used when printing the stream state). More...
seed[0..5]
. More...
incp = true
, each call to the RNG (direct or indirect) for this stream will return a uniform random number with more bits of precision than what is returned by nextValue
, and will advance the state of the stream by 2 steps instead of 1 (i.e., nextValue
will be called twice for each random number). More...
nextDouble
n
times to fill the array u
. More...
nextDouble
once to create one integer between i
and j
. More...
nextInt
n
times to fill the array u
. More...
toString
method.
toStringFull
method.
Extends the abstract class RandomStreamBase by using as a backbone (or main) generator the combined multiple recursive generator (CMRG) MRG32k3a
proposed by L’Ecuyer [148] , implemented in 64-bit floating-point arithmetic.
This backbone generator has a period length of \(\rho\approx2^{191}\). The values of \(V\), \(W\), and \(Z\) are \(2^{51}\), \(2^{76}\), and \(2^{127}\), 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)\).
Constructs a new stream, initializes its seed \(I_g\), sets \(B_g\) and \(C_g\) equal to \(I_g\), and sets its antithetic switch to false
.
The seed \(I_g\) is equal to the initial seed of the package given by setPackageSeed(long[]) if this is the first stream created, otherwise it is \(Z\) steps ahead of that of the stream most recently created in this class.
◆ MRG32k3a() [2/2]Constructs a new stream with an identifier name
(used when printing the stream state).
Clones the current generator and return its copy.
Implements CloneableRandomStream.
◆ getState()Returns the current state \(C_g\) of this stream.
This is a vector of 6 integers. This method is convenient if we want to save the state for subsequent use.
Sets the initial seed for the class MRG32k3a
to the six integers in the vector seed[0..5]
.
This will be the seed (initial state) of the first stream. If this method is not called, the default initial seed is \((12345, 12345, 12345, 12345, 12345, 12345)\). If it is called, the first 3 values of the seed must all be less than \(m_1 = 4294967087\), and not all 0; and the last 3 values must all be less than \(m_2 = 4294944443\), and not all 0.
Sets the initial seed \(I_g\) of this stream to the vector seed[0..5]
.
This vector must satisfy the same conditions as in setPackageSeed
. The stream is then reset to this initial seed. The states and seeds of the other streams are not modified. As a result, after calling this method, the initial seeds of the streams are no longer spaced \(Z\) values apart. For this reason, this method should be used only in very exceptional situations (I have never used it myself!); proper use of reset...
and of the stream constructor is preferable.
Returns a string containing the name and the current state \(C_g\) of this stream.
Implements RandomStream.
◆ toStringFull()Returns a string containing the name of this stream and the values of all its internal variables.
The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4