edu.cornell.lassp.houle.RngPack
Class RandomJava
- java.lang.Object
-
- edu.cornell.lassp.houle.RngPack.RandomElement
-
- edu.cornell.lassp.houle.RngPack.RandomJava
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class RandomJava extends RandomElement
RandomJava is a class wrapper for theMath.random()generator that comes with Java. I know nothing about the quality ofMath.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 aRandomElementwrapper 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.Source code is available.
-
-
Constructor Summary
Constructors Constructor and Description RandomJava()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleraw()Wrapper forMath.random().
-
-
-
Method Detail
-
raw
public double raw()
Wrapper forMath.random().- Specified by:
rawin classRandomElement- Returns:
- a random double in the range [0,1]
- See Also:
RandomElement.raw()
-
-
DMelt 3.0 © DataMelt by jWork.ORG