C# Class RandomOps.SumUInt32

Summing the output of multiple RNGs and taking modulo 2^32. Note that this assumes the RNGs have RandMax roughly equal to UInt32.MaxValue otherwise there will be a bias. Thread-safe if RNGs are thread-safe.
If you are using RNGs that have custom methods for generating random numbers then you need to extend this class in a fashion similar to that of the Uniform()-method.
Inheritance: RanUInt32
Exibir arquivo Open project: DanWBR/dwsim3

Public Methods

Method Description
Rand ( ) : UInt32

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

SumUInt32 ( RanUInt32 rands ) : System

Constructs the RNG-object from different RNG's.

Method Details

Rand() public final method

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

SumUInt32() public method

Constructs the RNG-object from different RNG's.
public SumUInt32 ( RanUInt32 rands ) : System
rands RanUInt32
return System