jhplot.math.num.random
Class RandomRNG

java.lang.Object
  extended by jhplot.math.num.random.RandomRNG
All Implemented Interfaces:
RNG

public class RandomRNG
extends java.lang.Object
implements RNG

A random number generator that delegates random number generation to a Random object.

Since:
1.3

Constructor Summary
RandomRNG()
          Create a random number generator using a default Random delegate.
RandomRNG(long seed)
          Create a random number generator using a Random delegate initialized with the given seed.
RandomRNG(java.util.Random rng)
          Create a random number generator using the given Random delegate.
 
Method Summary
 double nextRandomNumber()
          Access the next random number from this generator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomRNG

public RandomRNG()
Create a random number generator using a default Random delegate.


RandomRNG

public RandomRNG(long seed)
Create a random number generator using a Random delegate initialized with the given seed.

Parameters:
seed - the seed used to initialize the Random delegate.

RandomRNG

public RandomRNG(java.util.Random rng)
Create a random number generator using the given Random delegate.

Parameters:
rng - the Random delegate.
Method Detail

nextRandomNumber

public double nextRandomNumber()
Access the next random number from this generator.

Specified by:
nextRandomNumber in interface RNG
Returns:
the next random number.


jHepWork 2.8 (©) S.Chekanov