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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `next(int bits)`
    `boolean` | `nextBoolean()`
    `double` | `nextDouble()`
    `float` | `nextFloat()`
    `int` | `nextInt()`
    `long` | `nextLong()`
    `void` | `setSeed(int[] array)`
    `void` | `setSeed(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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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)

    - #### next

          protected int next(int bits)

    - #### 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.

Copyright © 2014. All Rights Reserved.