edu.cornell.lassp.houle.RngPack.RandomJava Maven / Gradle / Ivy
The newest version!
package edu.cornell.lassp.houle.RngPack;
import java.util.*;
//
// RngPack 1.1a by Paul Houle
// http://www.honeylocust.com/~houle/RngPack/
//
/**
* 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.
*
* @author Paul Houle (E-mail: [email protected])
* @version 1.1a
* @see Ranmar
* @see Ranlux
* @see Ranecu
*/
public class RandomJava extends RandomElement {
/**
* Wrapper for Math.random().
@see RandomElement#raw
*/
public double raw() {
return Math.random();
};
};
© 2015 - 2024 Weber Informatics LLC | Privacy Policy