|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.measure.random.RandomElement
org.jscience.measure.random.JavaGenerator
public class JavaGenerator
RandomJava is a class wrapper for the Math.random()
generator that comes with Java. I know nothing about the
quality of Math.random(), but I will warn the
reader that system-supplied
RNGs have a bad reputation; RandomJava is NOT
reccomended for general use, it has only been included as a
straightforward example of how to
build a RandomElement wrapper for an existing RNG.
The RANMAR, RANECU and RANLUX
generators included in this package all appear to be faster than
Math.random(); all three are well-studied, portable and
proven in use.
Ranmar,
Ranlux,
Ranecu| Constructor Summary | |
|---|---|
JavaGenerator()
|
|
| Method Summary | |
|---|---|
double |
nextDouble()
Wrapper for Math.random(). |
| Methods inherited from class org.jscience.measure.random.RandomElement |
|---|
choose, choose, clone, coin, coin, gaussian, gaussian, nextDouble, nextDouble, powlaw, uniform |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaGenerator()
| Method Detail |
|---|
public double nextDouble()
Math.random().
RandomElement.nextDouble(double[], int)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||