Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SPUC::Random_Generator Class Reference
[Random Number Generation]

Base class for random (stochastic) sources.

Uses Marsienne Twister random generator.

#include <random.h>

List of all members.

Public Member Functions

 Random_Generator ()
 Construct a new Random_Generator.
void randomize ()
 Set the seed to a semi-random value (based on time and process id).
void reset ()
 Reset the source. The same sequance will be generated as the last time.
void reset (unsigned int seed)
 Reset the source after setting the seed to seed.
unsigned int random_int ()
 Return a uniformly distributed [0,2^32-1] integer.
double random_01 ()
 Return a uniformly distributed (0,1) value. [2^¯33,1-2^-33] in steps of 2^-32.
double random_01_closed ()
 Return a uniformly distributed [0,1] value.


Constructor & Destructor Documentation

SPUC::Random_Generator::Random_Generator  ) 
 


Member Function Documentation

double SPUC::Random_Generator::random_01  )  [inline]
 

Here is the call graph for this function:

double SPUC::Random_Generator::random_01_closed  )  [inline]
 

Here is the call graph for this function:

unsigned int SPUC::Random_Generator::random_int  )  [inline]
 

void SPUC::Random_Generator::randomize  ) 
 

void SPUC::Random_Generator::reset unsigned int  seed  ) 
 

void SPUC::Random_Generator::reset  ) 
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 5 10:12:25 2005 for spuc by  doxygen 1.4.4