OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Random Class Reference

The CLASSIC random generator. More...

#include <ClassicRandom.h>

Collaboration diagram for Random:

Public Member Functions

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

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() [1/2]

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() [2/2]

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::~Random ( )

Definition at line 43 of file ClassicRandom.cpp.

Member Function Documentation

◆ gauss()

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

Gaussian distribution.

Definition at line 64 of file ClassicRandom.cpp.

References uniform().

Here is the call graph for this function:

◆ init55()

void Random::init55 ( int seed)

Initialise random number generator.

Definition at line 91 of file ClassicRandom.cpp.

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

Referenced by Random(), Random(), and reseed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ integer()

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:

◆ irngen()

void Random::irngen ( )
private

Definition at line 122 of file ClassicRandom.cpp.

References irn, next, and nr.

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

Here is the caller graph for this function:

◆ reseed()

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:

◆ uniform()

double Random::uniform ( )

Uniform distribution.

Definition at line 54 of file ClassicRandom.cpp.

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

Referenced by gauss().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ irn

int Random::irn[nr]
private

Definition at line 75 of file ClassicRandom.h.

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

◆ next

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: