OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Random Class Reference

The OPALX expression random generator. More...

#include <ExpressionRandom.h>

Collaboration diagram for Random:
Collaboration graph

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 OPALX expression random generator.

Definition at line 35 of file ExpressionRandom.h.

Constructor & Destructor Documentation

◆ Random() [1/2]

Random::Random ( )

Constructor with default seed.

Definition at line 27 of file ExpressionRandom.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 33 of file ExpressionRandom.cpp.

References init55().

Here is the call graph for this function:

◆ ~Random()

Random::~Random ( )

Definition at line 36 of file ExpressionRandom.cpp.

Member Function Documentation

◆ gauss()

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

Gaussian distribution.

Definition at line 51 of file ExpressionRandom.cpp.

References uniform().

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

Here is the call graph for this function:

◆ init55()

void Random::init55 ( int  seed)

Initialise random number generator.

Definition at line 76 of file ExpressionRandom.cpp.

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

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

Here is the call graph for this function:

◆ integer()

int Random::integer ( )

Uniform distribution.

Definition at line 69 of file ExpressionRandom.cpp.

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

Here is the call graph for this function:

◆ irngen()

void Random::irngen ( )
private

Definition at line 106 of file ExpressionRandom.cpp.

References irn, next, and nr.

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

◆ reseed()

void Random::reseed ( int  seed = 123456789)

Set a new seed.

Definition at line 39 of file ExpressionRandom.cpp.

References init55().

Here is the call graph for this function:

◆ uniform()

double Random::uniform ( )

Uniform distribution.

Definition at line 42 of file ExpressionRandom.cpp.

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

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

Here is the call graph for this function:

Member Data Documentation

◆ irn

int Random::irn[nr]
private

Definition at line 71 of file ExpressionRandom.h.

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

◆ next

int Random::next
private

Definition at line 74 of file ExpressionRandom.h.

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


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