C# Class RandomOps.ThreadSafe.Independent

Base-class for making thread-safe PRNGs by creating one PRNG object for each thread. The PRNGs should have very long periods to avoid overlapping. See ThreadSafeMWC256 for an example. This is a simple and reliable way of making an efficient and parallel PRNG, see the paper: P.D. Coddington, Random Number Generators for Parallel Computers, NPAC Technical Report, Version 1.1, 1997.
Inheritance: Random
Datei anzeigen Open project: DanWBR/dwsim3

Public Methods

Method Description
Gauss ( ) : double

Draw a Gaussian (or normally) distributed random number, with mean 0 and deviation 1. Thread-safe.

Independent ( ) : System.Threading

Constructs the PRNG-object.

Uniform ( ) : double

Draw a uniform random number in the exclusive range (0,1). Thread-safe.

Method Details

Gauss() public method

Draw a Gaussian (or normally) distributed random number, with mean 0 and deviation 1. Thread-safe.
public Gauss ( ) : double
return double

Independent() public method

Constructs the PRNG-object.
public Independent ( ) : System.Threading
return System.Threading

Uniform() public method

Draw a uniform random number in the exclusive range (0,1). Thread-safe.
public Uniform ( ) : double
return double