World Ocean Simulation System (WOSS) library
|
woss::RandomGenerator class More...
#include <random-generator-definitions.h>
Public Member Functions | |
RandomGenerator (int s=0) | |
virtual | ~RandomGenerator () |
virtual RandomGenerator * | create (double seed) |
virtual RandomGenerator * | clone () 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 | |
int | seed |
bool | initialized |
woss::RandomGenerator class
Class for random value generation purposes
|
inline |
Default RandomGenerator constructor
s | seed |
|
inlinevirtual |
Default destructor
|
inlinevirtual |
RandomGenerator virtual factory method
Reimplemented in WossRandomGenerator.
Referenced by woss::DefHandler::operator=().
|
inlinevirtual |
RandomGenerator virtual factory method
copy | RandomGenerator to be copied |
References seed.
|
virtual |
Gets a random value
Reimplemented in WossRandomGenerator.
References initialized.
Referenced by woss::DefHandler::getRand().
|
virtual |
Gets a random integer value
Reimplemented in WossRandomGenerator.
References initialized.
Referenced by woss::DefHandler::getRandInt().
|
inlinevirtual |
|
virtual |
Mandatory function to initialize the instance
Reimplemented in WossRandomGenerator.
References initialized, and seed.
|
inlinevirtual |
Checks the validity of RandomGenerator
References initialized.
|
inlinevirtual |
|
protected |
true if initialize() has been called, false otherwise
Referenced by getRand(), WossRandomGenerator::getRand(), getRandInt(), WossRandomGenerator::getRandInt(), initialize(), WossRandomGenerator::initialize(), and isValid().
|
protected |
seed value
Referenced by create(), getSeed(), initialize(), WossRandomGenerator::initialize(), and setSeed().