Click or drag to resize

RandGenMTwist Class

Class RandGenMTwist generates random numbers from a uniform distribution using the Mersenne Twister algorithm.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreRandomNumberGenerator
    CenterSpace.NMath.CoreRandGenMTwist

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public class RandGenMTwist : RandomNumberGenerator

The RandGenMTwist type exposes the following members.

Constructors
 NameDescription
Public methodRandGenMTwist Creates a random number generator using the time of day in milliseconds as the seed.
Public methodRandGenMTwist(Int32) Creates a random number generator initialized with the given seed.
Public methodRandGenMTwist(Int32) Creates a random number generator initialized with the given array.
Top
Properties
 NameDescription
Public propertyStatic memberMaxRandomInt Gets the maximum random integer value. All random integers generated by instances of this class are less than or equal to this value. This value is 0x7fffffff (2,147,483,647).
Public propertyUniformDeviateMethod Gets and sets the delegate method for generating uniform deviates between zero and one.
(Inherited from RandomNumberGenerator)
Top
Methods
 NameDescription
Public methodClone Creates a deep copy of this random number generator.
(Overrides RandomNumberGeneratorClone)
Public methodFill(Double) Fills the given array of doubles with random values.
(Inherited from RandomNumberGenerator)
Public methodFill(DoubleComplex) Fills the given array of double-precision complex numbers with random values.
(Inherited from RandomNumberGenerator)
Public methodFill(DoubleDataBlock) Fills the given data block with random values.
(Inherited from RandomNumberGenerator)
Public methodFill(FloatComplex) Fills the given array of single-precision complex numbers with random values.
(Inherited from RandomNumberGenerator)
Public methodFill(Int32) Fills the given array of integers with random values.
Public methodFill(Single) Fills the given array of floats with random values.
(Inherited from RandomNumberGenerator)
Public methodFill(Int32, Boolean) Fills the given array of integers with random values.
Public methodFill(Int32, Int32) Fills the given array of integers with random values.
Public methodFill(Int32, Int32, Boolean) Fills the given array of integers with random values.
Public methodFill(Int32, Int32, Int32) Fills the given array of integers with random values.
Public methodFill(Int32, Int32, Int32, Boolean) Fills the given array of integers with random values.
Public methodInitialize Reinitializes the random number generator using the time of day in milliseconds as the seed.
Public methodInitialize(Int32) Reinitializes the random number generator with the given seed.
Public methodInitialize(Int32) Reinitializes the random number generator with the given array.
Public methodNext Returns a random integer greater than or equal to zero and less than or equal to MaxRandomInt.
Public methodNext(Int32) Returns a positive random integer less than the specified maximum.
Public methodNext(Int32, Int32) Returns a random integer within the specified range.
Public methodNext53BitRes Generates a random number on [0,1) with 53-bit resolution.
Public methodNextDouble Returns a random number between 0.0 and 1.0.
(Overrides RandomNumberGeneratorNextDouble)
Public methodNextDouble(Boolean) Returns a random number greater than or equal to zero, and either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.
Public methodNextDoubleComplex Method for generating a double precision complex number random deviate.
(Inherited from RandomNumberGenerator)
Public methodNextDoubleComplex(Boolean) Returns a complex number with double-precision real and imaginary parts set to random numbers between 0.0 and 1.0. The bounds are either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.
Public methodNextDoubleComplexPositive Returns a complex number with double-precision real and imaginary parts set to random numbers between 0.0 and 1.0.
Public methodNextDoublePositive Returns a random number greater than 0.0 and less than 1.0.
Public methodNextFloat Returns a random number between 0.0 and 1.0.
(Overrides RandomNumberGeneratorNextFloat)
Public methodNextFloat(Boolean) Returns a random number greater than or equal to zero, and either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.
Public methodNextFloatComplex Method for generating a single precision complex number random deviate.
(Inherited from RandomNumberGenerator)
Public methodNextFloatComplex(Boolean) Returns a complex number with single-precision real and imaginary parts set to random numbers between 0.0 and 1.0. The bounds are either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.
Public methodNextFloatComplexPositive Returns a complex number with single-precision real and imaginary parts set to random numbers between 0.0 and 1.0.
Public methodNextFloatPositive Returns a random number greater than 0.0 and less than 1.0.
Public methodReset Resets the random number generator using a random seed.
(Inherited from RandomNumberGenerator)
Public methodReset(Int32) Resets the random number generator with the specified seed.
(Inherited from RandomNumberGenerator)
Top
Fields
 NameDescription
Protected fieldrand_ A delegate method for generating uniform deviates between zero and one.
(Inherited from RandomNumberGenerator)
Top
Remarks
Caution: MT is for MonteCarlo, and is NOT SECURE for CRYPTOGRAPHY as it is.
See Also