Reference for the Random Number Generators module.
Introduction
Random number generator types
Random number generator characteristics
Class reference links
The class RNG supports the use of random numbers draw according to various distributions. It implements a pseudo random number generator that creates uniformly distributed pseudo random numbers in the interval [0,1). All other distributions then use a so-called "inverse transformation" to transform a random number from this pseudo generator to a random number for the specific distribution. For details about this inverse transformation and the implementation of the pseudo random number generator, please refer to the description of class RNG.
The class RandomVar defines methods that are implemented by all random number generators. Each random number generator will provide the parenthesis operator "( )" to return a random number according to the specific distribution of the generator, and each generator will offer the method "p( x )" that returns the occurrence probability for the random number "x" or the value of the probability density function evaluated at "x", respectively.
The class RandomVar implements methods that can be used with all types of random number generators.
To simplify the generation of random numbers you can use class Rng that subsumes several commonly used random number generator types: You just have to include the header file of this class to have access to various types of random number generators.
Name | (D)iscrete/ | Parameters | Possible | Density | Expected | Variance |
|---|---|---|---|---|---|---|
D |
|
|
|
|
| |
D |
|
|
|
|
| |
C |
|
|
|
|
| |
D |
|
|
|
|
| |
D |
|
|
|
|
| |
C |
|
|
|
|
| |
D |
|
|
|
|
| |
D |
|
|
|
|
| |
C |
|
|
|
|
| |
C |
|
|
|
|
| |
C |
|
|
|
|
| |
D |
|
|
|
|
| |
C |
|
|
|
|
| |
C |
|
|
|
|
|