|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softsynth.jmsl.util.RandomDriver
public class RandomDriver
RandomDriver, an object of this type generates a random number sequence whose seed can be set and gotten. This is just like JMSLRandom except it can be instantiated, ie it has non-static methods. Use this when you want more than one random number sequence in a piece, where one or more of them may have the seed reset independently of the others.
Constructor Summary | |
---|---|
RandomDriver()
|
Method Summary | |
---|---|
double |
choose()
|
double |
choose(double high)
|
double |
choose(double low,
double high)
|
int |
choose(int high)
|
int |
choose(int low,
int high)
|
double |
choosePlusMinus(double range)
return random double between +range and -range |
int |
choosePlusMinus(int range)
return random integer between +range and -range, inclusive |
double |
gauss(double sigma,
double xmu)
Return a Gaussian distributed value. |
int |
getSeed()
|
static void |
main(java.lang.String[] args)
|
int |
qa()
|
void |
randomize()
set random seed from time |
void |
setSeed(int newSeed)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomDriver()
Method Detail |
---|
public int getSeed()
public void setSeed(int newSeed)
public void randomize()
public double choose()
public int choose(int high)
public double choose(double high)
public int choose(int low, int high)
public double choose(double low, double high)
public int choosePlusMinus(int range)
public double choosePlusMinus(double range)
public double gauss(double sigma, double xmu)
public 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 |