World Ocean Simulation System (WOSS) library
WossRandomGenerator Class Reference
Inheritance diagram for WossRandomGenerator:
Inheritance graph
Collaboration diagram for WossRandomGenerator:
Collaboration graph

Public Member Functions

 WossRandomGenerator (int seed=0)
 
 WossRandomGenerator (const WossRandomGenerator &copy)
 
WossRandomGeneratoroperator= (const WossRandomGenerator &copy)
 
virtual WossRandomGeneratorcreate (int s)
 
virtual WossRandomGeneratorclone () const
 
virtual double getRand () const
 
virtual int getRandInt () const
 
virtual void initialize ()
 
- Public Member Functions inherited from woss::RandomGenerator
 RandomGenerator (int s=0)
 
virtual ~RandomGenerator ()
 
virtual RandomGeneratorcreate (double seed)
 
virtual RandomGeneratorclone () const
 
virtual bool isValid () const
 
virtual void setSeed (int s)
 
virtual int getSeed () const
 
virtual void initialize ()
 
virtual double getRand () const
 
virtual int getRandInt () const
 

Protected Attributes

RNG * rng
 
- Protected Attributes inherited from woss::RandomGenerator
int seed
 
bool initialized
 

Member Function Documentation

◆ clone()

virtual WossRandomGenerator * WossRandomGenerator::clone ( ) const
inlinevirtual

RandomGenerator virtual factory method

Returns
a heap-allocated RandomGenerator copy of this instance

Reimplemented from woss::RandomGenerator.

◆ getRand()

double WossRandomGenerator::getRand ( ) const
virtual

Gets a random value

Returns
a random value between 0 and 1

Reimplemented from woss::RandomGenerator.

References woss::RandomGenerator::initialized.

◆ getRandInt()

int WossRandomGenerator::getRandInt ( ) const
virtual

Gets a random integer value

Returns
a random integer

Reimplemented from woss::RandomGenerator.

References woss::RandomGenerator::initialized.

◆ initialize()

void WossRandomGenerator::initialize ( )
virtual

Mandatory function to initialize the instance

Reimplemented from woss::RandomGenerator.

References woss::RandomGenerator::initialized, and woss::RandomGenerator::seed.


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