|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.JMSLRandom
public class JMSLRandom
Random number class. Algorithm from Cooper/Clancy "Oh! Pascal!"
Field Summary | |
---|---|
static int |
NUM_GAUSS_LOOPS
The higher the number of loops, the better gauss() approximates bell curve (Central Limit Theorem Method). |
Constructor Summary | |
---|---|
JMSLRandom()
|
Method Summary | |
---|---|
static double |
choose()
|
static double |
choose(double high)
|
static double |
choose(double low,
double high)
|
static int |
choose(int high)
|
static int |
choose(int low,
int high)
|
static double |
choosePlusMinus(double range)
return random double between +range and -range |
static int |
choosePlusMinus(int range)
return random integer between +range and -range, inclusive |
static double |
gauss(double sigma,
double xmu)
Return a Gaussian distributed value using Central Limit Theorem Method. |
static int |
getSeed()
|
static void |
main(java.lang.String[] args)
|
static int |
nextSeed()
|
static int |
qa()
|
static void |
randomize()
set random seed from time. |
static void |
setSeed(int s)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int NUM_GAUSS_LOOPS
Constructor Detail |
---|
public JMSLRandom()
Method Detail |
---|
public static void randomize()
public static void setSeed(int s)
public static int getSeed()
public static int nextSeed()
public static double choose()
public static int choose(int high)
public static double choose(double high)
public static int choose(int low, int high)
public static double choose(double low, double high)
public static int choosePlusMinus(int range)
public static double choosePlusMinus(double range)
public static double gauss(double sigma, double xmu)
public static int qa()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |