C# Class RandomOps.MWC256

Pseudo-Random Number Generator (PRNG) based on MWC256 by George Marsaglia. Period of this PRNG is about 2^8222. Not thread-safe.
This is a translation of the C source-code published 2003-05-13 in the newsgroup comp.lang.c by George Marsaglia, published here with Marsaglia's authorization under the license in license.txt
Inheritance: RanUInt32Array
Afficher le fichier Open project: DanWBR/dwsim3

Méthodes publiques

Méthode Description
MWC256 ( ) : System

Constructs the PRNG-object without a seed. Remember to seed it before drawing random numbers.

MWC256 ( Random rand ) : System

Constructs the PRNG-object and uses another RNG for seeding.

MWC256 ( UInt32 seed ) : System

Constructs the PRNG-object using the designated seed. This is useful if you want to repeat experiments with the same sequence of pseudo-random numbers.

Rand ( ) : UInt32

Draw a random number in inclusive range {0, .., RandMax}

Seed ( UInt32 seed ) : void

Seed with an array.

Method Details

MWC256() public méthode

Constructs the PRNG-object without a seed. Remember to seed it before drawing random numbers.
public MWC256 ( ) : System
Résultat System

MWC256() public méthode

Constructs the PRNG-object and uses another RNG for seeding.
public MWC256 ( Random rand ) : System
rand Random
Résultat System

MWC256() public méthode

Constructs the PRNG-object using the designated seed. This is useful if you want to repeat experiments with the same sequence of pseudo-random numbers.
public MWC256 ( UInt32 seed ) : System
seed System.UInt32
Résultat System

Rand() public final méthode

Draw a random number in inclusive range {0, .., RandMax}
public final Rand ( ) : UInt32
Résultat System.UInt32

Seed() public final méthode

Seed with an array.
public final Seed ( UInt32 seed ) : void
seed System.UInt32
Résultat void