Rng Documentation

Reference for the Random Number Generators module.


gauss3d.png

Introduction
Random number generator types
Random number generator characteristics
Class reference links



Introduction

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.



Random number generator types

Discrete Random Number Generators:

Continuous Random Number Generators:



Random number generator characteristics

Name

(D)iscrete/
(C)ontinuous

Parameters

Possible
Values

Density
Function

Expected
Value

Variance

Bernoulli

D

bern_par.gif
bern_poss.gif
bern_df.gif
bern_exp.gif
bern_var.gif

Binomial

D

bin_par.gif
bin_poss.gif
bin_df.gif
bin_exp.gif
bin_var.gif

Cauchy

C

cau_par.gif
cau_poss.gif
cau_df.gif
cau_exp.gif
cau_var.gif

Differential Geometric

D

diffgeom_par.gif
diffgeom_poss.gif
diffgeom_df.gif
diffgeom_exp.gif
diffgeom_var.gif

Discrete Uniform

D

discuni_par.gif
discuni_poss.gif
discuni_df.gif
discuni_exp.gif
discuni_var.gif

Erlang

C

erl_par.gif
erl_poss.gif
erl_df.gif
erl_exp.gif
erl_var.gif

Geometric

D

geom_par.gif
geom_poss.gif
geom_df.gif
geom_exp.gif
geom_var.gif

Hyper Geometric

D

hypgeom_par.gif
hypgeom_poss.gif
hypgeom_df.gif
hypgeom_exp.gif
hypgeom_var.gif

Log Normal

C

lognorm_par.gif
lognorm_poss.gif
lognorm_df.gif
lognorm_exp.gif
lognorm_var.gif

(Negative) Exponential

C

negexp_par.gif
negexp_poss.gif
negexp_df.gif
negexp_exp.gif
negexp_var.gif

Normal

C

norm_par.gif
norm_poss.gif
norm_df.gif
norm_exp.gif
norm_var.gif

Poisson

D

poiss_par.gif
poiss_poss.gif
poiss_df.gif
poiss_exp.gif
poiss_var.gif

Uniform

C

uni_par.gif
uni_poss.gif
uni_df.gif
uni_exp.gif
uni_var.gif

Weibull

C

wei_par.gif
wei_poss.gif
wei_df.gif
wei_exp.gif
wei_var.gif