OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Random Class Reference

The CLASSIC random generator. More...

#include <ClassicRandom.h>

Public Member Functions

 Random ()
 Constructor with default seed. More...
 
 Random (int seed)
 Constructor with given seed. More...
 
 ~Random ()
 
void reseed (int seed=123456789)
 Set a new seed. More...
 
double uniform ()
 Uniform distribution. More...
 
void gauss (double &gr1, double &gr2)
 Gaussian distribution. More...
 
int integer ()
 Uniform distribution. More...
 
void init55 (int seed)
 Initialise random number generator. More...
 

Private Member Functions

void irngen ()
 

Private Attributes

int irn [nr]
 
int next
 

Detailed Description

The CLASSIC random generator.

Definition at line 36 of file ClassicRandom.h.

Constructor & Destructor Documentation

Random::Random ( )

Constructor with default seed.

Definition at line 28 of file ClassicRandom.cpp.

References init55().

Here is the call graph for this function:

Random::Random ( int  seed)

Constructor with given seed.

Definition at line 37 of file ClassicRandom.cpp.

References init55().

Here is the call graph for this function:

Random::~Random ( )

Definition at line 43 of file ClassicRandom.cpp.

Member Function Documentation

void Random::gauss ( double &  gr1,
double &  gr2 
)

Gaussian distribution.

Definition at line 64 of file ClassicRandom.cpp.

References log(), sqrt(), and uniform().

Referenced by Expressions::gauss(), and Expressions::Tgauss().

Here is the call graph for this function:

void Random::init55 ( int  seed)

Initialise random number generator.

Definition at line 91 of file ClassicRandom.cpp.

References irn, irngen(), next, nr, and Options::seed.

Referenced by Option::execute(), Random(), and reseed().

Here is the call graph for this function:

int Random::integer ( )

Uniform distribution.

Definition at line 83 of file ClassicRandom.cpp.

References irn, irngen(), next, and nr.

Here is the call graph for this function:

void Random::irngen ( )
private

Definition at line 122 of file ClassicRandom.cpp.

References irn, next, and nr.

Referenced by init55(), integer(), and uniform().

void Random::reseed ( int  seed = 123456789)

Set a new seed.

Definition at line 48 of file ClassicRandom.cpp.

References init55().

Here is the call graph for this function:

double Random::uniform ( )

Uniform distribution.

Definition at line 54 of file ClassicRandom.cpp.

References irn, irngen(), next, and nr.

Referenced by gauss(), and Expressions::ranf().

Here is the call graph for this function:

Member Data Documentation

int Random::irn[nr]
private

Definition at line 75 of file ClassicRandom.h.

Referenced by init55(), integer(), irngen(), and uniform().

int Random::next
private

Definition at line 78 of file ClassicRandom.h.

Referenced by init55(), integer(), irngen(), and uniform().


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