C# Класс RandomOps.CMWC4096

Pseudo-Random Number Generator (PRNG) based on CMWC4096 as described in the paper: G. Marsaglia, Random Number Generators, Journal of Modern Applied Statistical Methods, 2003, vol. 2, no. 1, p. 2-13. Period of this PRNG is about 2^131104. 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
Наследование: RanUInt32Array
Показать файл Открыть проект

Открытые методы

Метод Описание
CMWC4096 ( ) : System

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

CMWC4096 ( Random rand ) : System

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

CMWC4096 ( 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 integer.

Описание методов

CMWC4096() публичный Метод

Constructs the PRNG-object without a seed. Remember to seed it before drawing random numbers.
public CMWC4096 ( ) : System
Результат System

CMWC4096() публичный Метод

Constructs the PRNG-object and uses another RNG for seeding.
public CMWC4096 ( Random rand ) : System
rand Random
Результат System

CMWC4096() публичный Метод

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 CMWC4096 ( UInt32 seed ) : System
seed System.UInt32
Результат System

Rand() публичный закрытый Метод

Draw a random number in inclusive range {0, .., RandMax}
public final Rand ( ) : UInt32
Результат System.UInt32

Seed() публичный закрытый Метод

Seed with an integer.
public final Seed ( UInt32 seed ) : void
seed System.UInt32
Результат void