|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jsyn.util.PseudoRandom
public class PseudoRandom
Pseudo-random numbers using predictable and fast linear-congruential method.
Constructor Summary | |
---|---|
PseudoRandom()
Create an instance of SynthRandom. |
|
PseudoRandom(int seed)
Create an instance of PseudoRandom. |
Method Summary | |
---|---|
int |
choose(int range)
|
int |
getSeed()
|
double |
nextRandomDouble()
Returns the next random double from -1.0 to 1.0 |
int |
nextRandomInteger()
Calculate random 32 bit number using linear-congruential method. |
double |
random()
Returns the next random double from 0.0 to 1.0 |
void |
setSeed(int seed)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PseudoRandom()
public PseudoRandom(int seed)
Method Detail |
---|
public void setSeed(int seed)
public int getSeed()
public double random()
public double nextRandomDouble()
public int nextRandomInteger()
public int choose(int range)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |