Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

Distrib Class Reference

#include <distrib.h>

Inheritance diagram for Distrib:

Constant DiscreteEmpirical ErlangK Exponential HyperExponential Normal Pareto Unif01 Uniform List of all members.

Public Member Functions

virtual double GetVal (void)=0

Static Public Member Functions

static void InitRng (unsigned long int seed=0)

Protected Member Functions

 Distrib (void)
double Pick (void)

Detailed Description

RNG abstract class. Abstract class that contains an implementation of the Wichmann-Hill composite linear congruential random number generator.

Must be implemented in derived classes. The derived GetVal(void) will call Pick(void) and will operate with the result to give succesive random numbers properly distributed.


Constructor & Destructor Documentation

Distrib::Distrib void   )  [protected]
 

Only one random number generator may exist, no matter how many distributions are used by the simulation model.


Member Function Documentation

virtual double Distrib::GetVal void   )  [pure virtual]
 

Gets next random number according to the class' distribution.

Returns:
next random number generated according to a distribution determined by the derived class.

Implemented in Constant, Unif01, Uniform, Exponential, Normal, ErlangK, Pareto, HyperExponential, and DiscreteEmpirical.

void Distrib::InitRng unsigned long int  seed = 0  )  [static]
 

Seed initiator, must be called before any derived "GetVal". If no seed is given or seed==0, a random one will be automatically chosen

Parameters:
seed 

double Distrib::Pick void   )  [protected]
 

Picks next random number. Succesive calls return evenly distributed random numbers in [0,1) It is available only to derived classes.


The documentation for this class was generated from the following files:
Generated on Fri Jan 19 15:35:17 2007 by  doxygen 1.4.2