edu.cornell.lassp.houle.RngPack
Class RandomJava

java.lang.Object
  extended byedu.cornell.lassp.houle.RngPack.RandomElement
      extended byedu.cornell.lassp.houle.RngPack.RandomJava
All Implemented Interfaces:
java.lang.Cloneable

public class RandomJava
extends RandomElement

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.

Source code is available.

See Also:
Ranmar, Ranlux, Ranecu

Constructor Summary
RandomJava()
           
 
Method Summary
 double raw()
          Wrapper for Math.random().
 
Methods inherited from class edu.cornell.lassp.houle.RngPack.RandomElement
choose, choose, clone, coin, coin, gaussian, gaussian, powlaw, raw, raw, uniform
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomJava

public RandomJava()
Method Detail

raw

public double raw()
Wrapper for Math.random().

Specified by:
raw in class RandomElement
Returns:
a random double in the range [0,1]
See Also:
RandomElement.raw()