class RandomVar

The basic abstract class for random variables

Inheritance:


Public Classes

class Exc: public BaseExc
Exception for RandomVar.

Public Methods

RandomVar(RandomGen *g = NULL)
Constructor for RandomVar
static inline void init(RandNum s)
Initialize the standard generator with a given seed
static RandomGen* changeGenerator(RandomGen *g)
Change the standard generator
static void restoreGenerator()
Restore the standard generator
virtual double get(void)
This method must be overloaded in each derived class to return a double according to the propoer distriibution

Protected Fields

static RandomGen _stdgen
Default generator.
static RandomGen* _pstdgen
Pointer to the current generator (used by the next RandomVar object to be created
RandomGen* _gen
The current random generator (used by this object)

Documentation

The basic abstract class for random variables
static RandomGen _stdgen
Default generator.

static RandomGen* _pstdgen
Pointer to the current generator (used by the next RandomVar object to be created

RandomGen* _gen
The current random generator (used by this object). By default, it is equal to _pstdgen

class Exc: public BaseExc
Exception for RandomVar.

RandomVar(RandomGen *g = NULL)
Constructor for RandomVar. It takes as argument the random number generator. By default, this is equal to _pstdgen. It is possible to change the default generator with changeGenerator().
Parameters:
g - The random number generator. By default, this is NULL, which means that the default generator is _pstdgen

static inline void init(RandNum s)
Initialize the standard generator with a given seed

static RandomGen* changeGenerator(RandomGen *g)
Change the standard generator

static void restoreGenerator()
Restore the standard generator

virtual double get(void)
This method must be overloaded in each derived class to return a double according to the propoer distriibution


Direct child classes:
UniformVar
DetVar
DeltaVar

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de