eosim::dist::NumberGenerator Class Reference
[Distributions]

#include <eosim/dist/numbergenerator.hpp>

Inheritance diagram for eosim::dist::NumberGenerator:

Inheritance graph
[legend]
List of all members.

Detailed Description

Random Number Generator Interface.

Author:
Sebastián Alaggia
Version:
1.0.1
Date:
2005

This is the interface for all random number generator in EOSimulator. They generate two kinds of numbers: integer (NumberGenerator::nextLong) and uniform numbers in [0,1] (NumberGenerator::nextDouble).

NumberGenerators are not directly assigned to a distributions, they are assigned by the use of the label GenType. This enum defines a label for each type of number generator implemented in EOSimulator. Then the label is used by the NumberGeneratorFactory to create an specific number generator for a distribution.

In order to add a new generator in EOSimulator, GenType and NumberGeneratorFactory have to be updated.


Public Member Functions

 NumberGenerator ()
 The constructor of NumberGenerator.
virtual ~NumberGenerator ()
 The destructor of NumberGenerator.
virtual void setSeed (const unsigned long seed)=0
 This abstract operation assign seed to the generator’s seed.
virtual double nextDouble ()=0
 This abstract operation returns double between 0 and 1 generated by the generator.
virtual unsigned long nextLong ()=0
 This abstract operation returns unsigned long generated by the generator.


Generated on Tue Oct 14 16:48:58 2008 for EOSimulator by  doxygen 1.5.2