|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.rng.RandMrg
@Deprecated public class RandMrg
Constructor Summary | |
---|---|
RandMrg()
Deprecated. Constructs a new stream, initializes its seed Ig, sets Bg and Cg equal to Ig, and sets its antithetic switch to false. |
|
RandMrg(String name)
Deprecated. Constructs a new stream with an identifier name (can be used when printing the stream state, in error messages, etc.). |
Method Summary | |
---|---|
void |
advanceState(int e,
int c)
Deprecated. Advances the state of this stream by k values, without modifying the states of other streams (as in setSeed), nor the values of Bg and Ig associated with this stream. |
RandMrg |
clone()
Deprecated. Clones the current generator and return its copy. |
double[] |
getState()
Deprecated. Returns the current state Cg of this stream. |
void |
increasedPrecis(boolean incp)
Deprecated. After calling this method with incp = true, each call to the generator (direct or indirect) for this stream will return a uniform random number with (roughly) 53 bits of resolution instead of 32 bits, and will advance the state of the stream by 2 steps instead of 1. |
void |
nextArrayOfDouble(double[] u,
int start,
int n)
Deprecated. Generates n (pseudo)random numbers from the uniform distribution and stores them into the array u starting at index start. |
void |
nextArrayOfInt(int i,
int j,
int[] u,
int start,
int n)
Deprecated. Generates n (pseudo)random numbers from the discrete uniform distribution over the integers {i, i + 1,..., j}, using this stream and stores the result in the array u starting at index start. |
double |
nextDouble()
Deprecated. Returns a (pseudo)random number from the uniform distribution over the interval (0, 1), using this stream, after advancing its state by one step. |
int |
nextInt(int i,
int j)
Deprecated. Returns a (pseudo)random number from the discrete uniform distribution over the integers {i, i + 1,..., j}, using this stream. |
void |
resetNextSubstream()
Deprecated. Reinitializes the stream to the beginning of its next substream: Ng is computed, and Cg and Bg are set to Ng. |
void |
resetStartStream()
Deprecated. Reinitializes the stream to its initial state Ig: Cg and Bg are set to Ig. |
void |
resetStartSubstream()
Deprecated. Reinitializes the stream to the beginning of its current substream: Cg is set to Bg. |
void |
setAntithetic(boolean anti)
Deprecated. |
static void |
setPackageSeed(long[] seed)
Deprecated. Sets the initial seed for the class RandMrg to the six integers in the vector seed[0..5]. |
void |
setSeed(long[] seed)
Deprecated. Sets the initial seed Ig of this stream to the vector seed[0..5]. |
String |
toString()
Deprecated. Returns a string containing the current state of this stream. |
String |
toStringFull()
Deprecated. Returns a string containing the name of this stream and the values of all its internal variables. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RandMrg()
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 RandMrg(String name)
name
- name of the streamMethod Detail |
---|
public static void setPackageSeed(long[] seed)
seed
- array of 6 elements representing the seedpublic void resetStartStream()
RandomStream
resetStartStream
in interface RandomStream
public void resetStartSubstream()
RandomStream
resetStartSubstream
in interface RandomStream
public void resetNextSubstream()
RandomStream
resetNextSubstream
in interface RandomStream
public void increasedPrecis(boolean incp)
By default, or if this method is called again with incp = false, each call to nextDouble for this stream advances the state by 1 step and returns a number with 32 bits of resolution.
incp
- true if increased precision is desired, false otherwisepublic void setAntithetic(boolean anti)
public void advanceState(int e, int c)
e
- an exponentc
- a constantpublic void setSeed(long[] seed)
seed
- array of 6 integers representing the new seedpublic double[] getState()
public String toString()
RandomStream
toString
in interface RandomStream
toString
in class Object
public String toStringFull()
public double nextDouble()
nextDouble
in interface RandomStream
public void nextArrayOfDouble(double[] u, int start, int n)
RandomStream
nextArrayOfDouble
in interface RandomStream
u
- array that will contain the generated uniformsstart
- starting index, in the array u, to write uniforms fromn
- number of uniforms to generatepublic int nextInt(int i, int j)
RandomStream
nextInt
in interface RandomStream
i
- smallest integer that can be generatedj
- greatest integer that can be generated
public void nextArrayOfInt(int i, int j, int[] u, int start, int n)
RandomStream
nextArrayOfInt
in interface RandomStream
i
- smallest integer that can be generatedj
- greatest integer that can be generatedu
- array that will contain the generated valuesstart
- starting index, in the array u, to write integers fromn
- number of values being generatedpublic RandMrg clone()
clone
in interface CloneableRandomStream
clone
in class Object
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |