Generated on Tue Dec 16 12:50:11 2008 for BIU-2.2.0 by doxygen 1.5.1

biu::RNG_LCG Class Reference

#include <RandomNumberGenerator.hh>

Inheritance diagram for biu::RNG_LCG:

Inheritance graph
[legend]

Detailed Description

This subclass of RandomNumberGenerator uses a linear congruent generator to generate pseudo random numbers based on a seed value. The series of random numbers generated does not depend on the CPU used.

Author:
Daniel Maticzka

Definition at line 105 of file RandomNumberGenerator.hh.

Public Member Functions

virtual RandomNumberGeneratorcopy (void)
virtual unsigned int getMaxRN ()
virtual unsigned int getRN ()
 RNG_LCG (unsigned int seed=1)
virtual void setSeed (unsigned int _seed)
virtual ~RNG_LCG ()

Protected Attributes

unsigned int seed


Constructor & Destructor Documentation

biu::RNG_LCG::RNG_LCG ( unsigned int  seed = 1  ) 

Creates a RNG_LCG object.

Parameters:
seed the initial seed value defaults to 1.

Definition at line 50 of file RandomNumberGenerator.cc.

biu::RNG_LCG::~RNG_LCG (  )  [virtual]

Definition at line 55 of file RandomNumberGenerator.cc.


Member Function Documentation

RandomNumberGenerator * biu::RNG_LCG::copy ( void   )  [virtual]

Creates a new Copy of this object.

Implements biu::RandomNumberGenerator.

Definition at line 110 of file RandomNumberGenerator.cc.

unsigned int biu::RNG_LCG::getMaxRN (  )  [virtual]

Returns the largest value the rand function will return.

Implements biu::RandomNumberGenerator.

Definition at line 105 of file RandomNumberGenerator.cc.

unsigned int biu::RNG_LCG::getRN (  )  [virtual]

Returns the next random number in the series. It's value will be in [0, getMaxRN()].

Implements biu::RandomNumberGenerator.

Definition at line 67 of file RandomNumberGenerator.cc.

void biu::RNG_LCG::setSeed ( unsigned int  _seed  )  [virtual]

Specifies the seed value used for random number generation.

Implements biu::RandomNumberGenerator.

Definition at line 60 of file RandomNumberGenerator.cc.


Field Documentation

unsigned int biu::RandomNumberGenerator::seed [protected, inherited]

Definition at line 15 of file RandomNumberGenerator.hh.


The documentation for this class was generated from the following files: