org.encog.mathutil.randomize.generate
Class MersenneTwisterGenerateRandom
- java.lang.Object
-
- org.encog.mathutil.randomize.generate.AbstractGenerateRandom
-
- org.encog.mathutil.randomize.generate.AbstractBoxMuller
-
- org.encog.mathutil.randomize.generate.MersenneTwisterGenerateRandom
-
- All Implemented Interfaces:
- GenerateRandom
public class MersenneTwisterGenerateRandom extends AbstractBoxMuller
The Mersenne twister is a pseudo random number generator developed in 1997 by Makoto Matsumoto and Takuji Nishimura that is based on a matrix linear recurrence over a finite binary field F2. References: http://www.cs.gmu.edu/~sean/research http://en.wikipedia.org/wiki/Mersenne_twister/ Makato Matsumoto and Takuji Nishimura, "Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on Modeling and. Computer Simulation, Vol. 8, No. 1, January 1998, pp 3--30.
-
-
Field Summary
-
Fields inherited from class org.encog.mathutil.randomize.generate.AbstractBoxMuller
MU
-
-
Constructor Summary
Constructors Constructor and Description MersenneTwisterGenerateRandom()MersenneTwisterGenerateRandom(int[] array)MersenneTwisterGenerateRandom(long seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleannextBoolean()doublenextDouble()floatnextFloat()intnextInt()longnextLong()voidsetSeed(int[] array)voidsetSeed(long seed)-
Methods inherited from class org.encog.mathutil.randomize.generate.AbstractBoxMuller
nextGaussian
-
Methods inherited from class org.encog.mathutil.randomize.generate.AbstractGenerateRandom
nextDouble, nextDouble, nextInt, nextInt
-
-
-
-
Constructor Detail
-
MersenneTwisterGenerateRandom
public MersenneTwisterGenerateRandom()
-
MersenneTwisterGenerateRandom
public MersenneTwisterGenerateRandom(long seed)
-
MersenneTwisterGenerateRandom
public MersenneTwisterGenerateRandom(int[] array)
-
-
Method Detail
-
setSeed
public void setSeed(long seed)
-
setSeed
public void setSeed(int[] array)
-
nextDouble
public double nextDouble()
- Returns:
- The next random double.
-
nextLong
public long nextLong()
- Returns:
- The next random long.
-
nextBoolean
public boolean nextBoolean()
- Returns:
- The next random boolean.
-
nextFloat
public float nextFloat()
- Returns:
- The next random floating point.
-
nextInt
public int nextInt()
- Returns:
- The next random integer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG