cern.jet.random.engine
Class MersenneTwister64

java.lang.Object
  extended by cern.colt.PersistentObject
      extended by cern.jet.random.engine.RandomEngine
          extended by cern.jet.random.engine.MersenneTwister
              extended by cern.jet.random.engine.MersenneTwister64
All Implemented Interfaces:
DoubleFunction, IntFunction, java.io.Serializable, java.lang.Cloneable

public class MersenneTwister64
extends MersenneTwister

Same as MersenneTwister except that method raw() returns 64 bit random numbers instead of 32 bit random numbers.

Author:
wolfgang.hoschek@cern.ch
See Also:
MersenneTwister, Serialized Form

Field Summary
 
Fields inherited from class cern.jet.random.engine.MersenneTwister
DEFAULT_SEED
 
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
 
Constructor Summary
MersenneTwister64()
          Constructs and returns a random number generator with a default seed, which is a constant.
MersenneTwister64(java.util.Date d)
          Constructs and returns a random number generator seeded with the given date.
MersenneTwister64(int seed)
          Constructs and returns a random number generator with the given seed.
 
Method Summary
 double raw()
          Returns a 64 bit uniformly distributed random number in the open unit interval (0.0,1.0) (excluding 0.0 and 1.0).
 
Methods inherited from class cern.jet.random.engine.MersenneTwister
clone, nextBlock, nextInt, setSeed
 
Methods inherited from class cern.jet.random.engine.RandomEngine
apply, apply, makeDefault, nextDouble, nextFloat, nextLong
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MersenneTwister64

public MersenneTwister64()
Constructs and returns a random number generator with a default seed, which is a constant.


MersenneTwister64

public MersenneTwister64(int seed)
Constructs and returns a random number generator with the given seed.

Parameters:
seed - should not be 0, in such a case MersenneTwister64.DEFAULT_SEED is silently substituted.

MersenneTwister64

public MersenneTwister64(java.util.Date d)
Constructs and returns a random number generator seeded with the given date.

Parameters:
d - typically new java.util.Date()
Method Detail

raw

public double raw()
Returns a 64 bit uniformly distributed random number in the open unit interval (0.0,1.0) (excluding 0.0 and 1.0).

Overrides:
raw in class RandomEngine