edu.rit.numeric
Class DoublePrng
java.lang.Object
edu.rit.numeric.DoublePrng
- Direct Known Subclasses:
- ExponentialPrng, NormalPrng, UniformPrng
public abstract class DoublePrng
- extends Object
Class DoublePrng is the abstract base class for a pseudorandom number
generator (PRNG) that generates random numbers of type double. The
generated random numbers' probability distribution is determined by the
subclass.
|
Constructor Summary |
DoublePrng(Random theUniformPrng)
Construct a new double PRNG. |
|
Method Summary |
abstract double |
next()
Returns the next random number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myUniformPrng
protected final Random myUniformPrng
- The underlying uniform PRNG.
DoublePrng
public DoublePrng(Random theUniformPrng)
- Construct a new double PRNG.
- Parameters:
theUniformPrng - The underlying uniform PRNG.
- Throws:
NullPointerException - (unchecked exception) Thrown if theUniformPrng is null.
next
public abstract double next()
- Returns the next random number.
- Returns:
- Random number.
Copyright © 2005-2012 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.