C# Class RandomOps.RanQD

Pseudo-Random Number Generator (PRNG) based on the RanQD1 (Quick and Dirty) algorithm from the book: 'Numerical Recipes in C' chapter 7.1. Not thread-safe.
Inheritance: RanUInt32
Exibir arquivo Open project: DanWBR/dwsim3

Public Methods

Method Description
RanQD ( ) : System

Constructs the PRNG-object and seeds the PRNG with the current time of day. This is what you will mostly want to use.

RanQD ( 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}

Protected Methods

Method Description
Seed ( UInt32 seed ) : void

Seed with an integer.

Method Details

RanQD() public method

Constructs the PRNG-object and seeds the PRNG with the current time of day. This is what you will mostly want to use.
public RanQD ( ) : System
return System

RanQD() public method

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 RanQD ( UInt32 seed ) : System
seed System.UInt32
return System

Rand() public final method

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

Seed() protected final method

Seed with an integer.
protected final Seed ( UInt32 seed ) : void
seed System.UInt32
return void