Represents a pseudo-random number generator based on the Mersenne Twister
algorithm.
SystemObject SystemRandom Extreme.Mathematics.RandomExtendedRandom Extreme.Mathematics.RandomRandomWordGenerator Extreme.Mathematics.RandomMersenneTwister
Namespace:
Extreme.Mathematics.Random
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
[SerializableAttribute]
public sealed class MersenneTwister : RandomWordGenerator
<SerializableAttribute>
Public NotInheritable Class MersenneTwister
Inherits RandomWordGenerator
[SerializableAttribute]
public ref class MersenneTwister sealed : public RandomWordGenerator
[<SealedAttribute>]
[<SerializableAttribute>]
type MersenneTwister =
class
inherit RandomWordGenerator
end
The MersenneTwister type exposes the following members.
| Name | Description |
---|
 | MersenneTwister |
Initializes a new instance of the MersenneTwister class
using a time-dependent default seed value.
|
 | MersenneTwister(Int32) |
Initializes a new instance of the MersenneTwister class
using the specified seed value.
|
 | MersenneTwister(Int32) |
Initializes a new instance of the MersenneTwister class
using the specified seed array of seed values.
|
Top
Top
| Name | Description |
---|
 | AsParallel |
Returns a thread-safe version of this random number generator.
(Defined by RandomExtensions.) |
 | CorrelatedSamples |
Generates a series of random variables with the specified correlation matrix.
(Defined by RandomExtensions.) |
 | Fill(IListDouble) | Overloaded.
Fills a Double array with random numbers.
(Defined by RandomExtensions.) |
 | Fill(IListInt32) | Overloaded.
Fills an Int32 array with random numbers.
(Defined by RandomExtensions.) |
 | Fill(Double, ContinuousDistribution) | Overloaded.
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(Int32, DiscreteDistribution) | Overloaded.
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(VectorDouble, ContinuousDistribution) | Overloaded.
Fills a vector with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(VectorDouble, DiscreteDistribution) | Overloaded.
Fills a vector with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(Double, Int32, Int32) | Overloaded.
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(IListDouble, Int32, Int32) | Overloaded.
Fills a Double array with random numbers.
(Defined by RandomExtensions.) |
 | Fill(IListInt32, Int32, Int32) | Overloaded.
Fills an Int32 array with random numbers.
(Defined by RandomExtensions.) |
 | Fill(Int32, Int32, Int32) | Overloaded.
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(Double, Int32, Int32, ContinuousDistribution) | Overloaded.
Fills a Double array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | Fill(Int32, Int32, Int32, DiscreteDistribution) | Overloaded.
Fills an Int32 array with random samples from the specified distribution.
(Defined by RandomExtensions.) |
 | FillNormal(IListDouble) | Overloaded.
Fills a list with normal random numbers with zero mean and unit
standard deviation.
(Defined by RandomExtensions.) |
 | FillNormal(IListDouble, Int32, Int32) | Overloaded.
Fills a list with normal random numbers with zero mean and unit
standard deviation.
(Defined by RandomExtensions.) |
 | Next |
Returns a sample from the specified distribution.
(Defined by RandomExtensions.) |
 | NextDouble |
Returns a sample from the specified distribution.
(Defined by RandomExtensions.) |
Top
Use the MersenneTwister class to represent a pseudo-this.random
number generator that uses the Mersenne Twister algorithm of Takuji Nishimura and Makoto Matsumoto.
This generator has a very long period of 219937-1. This period is a Mersenne prime number
(since 19937 is prime), whence its name. The algorithm is very fast and produces very good random sequences.
MersenneTwister can be used in place of
the Random class to obtain
pseudo-random numbers of a higher quality.
The Mersenne Twister is a linear random number
generator. This makes it unsuitable for use in cryptography
applications. To generate a cryptographically secure random
number suitable for creating a random password, for example,
use a class derived from
RandomNumberGenerator
such as
RNGCryptoServiceProvider.
Reference