C# Class RandomOps.KISS

Pseudo-Random Number Generator (PRNG) based on KISS 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 greater than 2^124. Not thread-safe.
This is a translation of the C source-code published in the paper cited above with Marsaglia's authorization, also under the license in license.txt
Inheritance: RanUInt32Array
显示文件 Open project: DanWBR/dwsim3

Public Properties

Property Type Description
SeedDefault System.UInt32[]

Public Methods

Method Description
KISS ( ) : System

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

KISS ( Random rand ) : System

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

KISS ( 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

KISS() public method

Constructs the PRNG-object without a seed. Remember to seed it before drawing random numbers.
public KISS ( ) : System
return System

KISS() public method

Constructs the PRNG-object and uses another RNG for seeding.
public KISS ( Random rand ) : System
rand Random
return System

KISS() 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 KISS ( 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() public final method

Seed with an array.
public final Seed ( UInt32 seed ) : void
seed System.UInt32
return void

Property Details

SeedDefault public_oe static_oe property

Default seed.
public static UInt32[],System SeedDefault
return System.UInt32[]