Click or drag to resize

MT19937 Class

Random number generator using the Mersenne Twister 19937 algorithm. This is the default random number generator used. To change the default, set the static type value of Demo3D.Common.Random.GeneratorRegistry.DefaultGeneratorType.
Inheritance Hierarchy
SystemObject
  SystemRandom
    Demo3D.Common.RandomMT19937

Namespace: Demo3D.Common.Random
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.00.00
Syntax
C#
public class MT19937 : Random

The MT19937 type exposes the following members.

Constructors
 NameDescription
Public methodMT19937 Initializes a new instance of the MersenneTwister class, using a time-dependent default seed value.
Public methodMT19937(Int32) Initializes a new instance of the MersenneTwister class, using the specified seed value.
Top
Methods
 NameDescription
Public methodNext Returns a non-negative random integer.
(Overrides RandomNext)
Public methodNext(Int32, Int32) Returns a random integer that is within a specified range.
(Overrides RandomNext(Int32, Int32))
Public methodNextBytes Fills the elements of a specified array of bytes with random numbers.
(Overrides RandomNextBytes(Byte))
Protected methodSample Returns a random floating-point number between 0.0 and 1.0.
(Overrides RandomSample)
Top
See Also