|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Statistics.Random
Provides static methods to generate random numbers based on the * cern.jet.random random number generators.
* *Two uniform random number generators (MersenneTwisters with different * seeds) are allocated to support the Box Muller standard normal random number * generator with "more independent" uniform coordinates v1, v2. * This shows slight improvement versus repeated calls to the same uniform * random number gnerator.
* *The two uniform random number generators are seeded statically and so * cycle through the same sequences of random numbers when restarted. * The same is true of the standard normal random numbers derived from these. *
* * @author Michael J. Meyer
Field Summary | |
static cern.jet.random.Uniform |
uniform_1
First MersenneTwister uniform random number generator. |
static cern.jet.random.Uniform |
uniform_2
Second MersenneTwister uniform random number generator. |
Constructor Summary | |
Random()
|
Method Summary | |
static int |
Sign()
Fair draw from {1,-1}. |
static int |
Sign(double p)
Loaded draw X from {-1,1}. |
static double |
STN()
Standard normal deviate using the inverse normal CDF on uniform * deviates generated by the Mersenne Twister. |
static double |
U1()
First uniform u\in(0,1). |
static double |
U2()
Second uniform u\in(0,1). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final cern.jet.random.Uniform uniform_1
First MersenneTwister uniform random number generator.
public static final cern.jet.random.Uniform uniform_2
Second MersenneTwister uniform random number generator.
Constructor Detail |
public Random()
Method Detail |
public static double U1()
First uniform u\in(0,1).
public static double U2()
Second uniform u\in(0,1).
public static int Sign()
public static int Sign(double p)
Loaded draw X from {-1,1}. * X=1 with probability p, * X=-1 with probability 1-p.
* * @param p Probability that X=+1.
public static double STN()
Standard normal deviate using the inverse normal CDF on uniform * deviates generated by the Mersenne Twister.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |