|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corejava.RandomIntGenerator
An improved random number generator based on Algorithm B in Knuth Vol 2 p32. Gives a set of random integers that does not exhibit as much correlation as the method used by the Java random number generator.
Constructor Summary | |
RandomIntGenerator(int l,
int h)
Constructs an object that generates random integers in a given range |
Method Summary | |
int |
draw()
Generates a random integer in a range of integers |
static void |
main(java.lang.String[] args)
test stub for the class |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RandomIntGenerator(int l, int h)
l
- the lowest integer in the rangeh
- the highest integer in the rangeMethod Detail |
public int draw()
public static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |