#include <random.h>
Inherited by cps::GaussianRandomGenerator [virtual], and cps::UniformRandomGenerator [virtual].
Public Member Functions | |
| RandomGenerator () | |
| IFloat | Rand () |
| Gets a random number. | |
| void | Reset (int seed) |
| Seeds the RNG. | |
| void | StoreSeeds (unsigned int *to) const |
| Stores the RNG state. | |
| void | RestoreSeeds (const unsigned int *from) |
| Loads the RNG state. | |
| int | StateSize () const |
| Size of the RNG state. | |
| virtual int | RNGints () const |
| Number of Integers in RNG, that should be stored to record status. | |
| void | store (int *buf) |
| to store this object | |
| void | load (int *buf) |
| to load from file | |
This uses the Fibonacci RNG routine (ran3) from Numerical Recipes in C
Definition at line 42 of file random.h.
|
|
|
|
|
to load from file
Reimplemented in cps::GaussianRandomGenerator. |
|
|
Gets a random number.
Reimplemented in cps::UniformRandomGenerator. Definition at line 42 of file random_asm.C. References cps::MPISCU::printf(). Referenced by cps::UniformRandomGenerator::Rand(), and cps::GaussianRandomGenerator::Rand(). |
|
|
Seeds the RNG. This method must be called before the RNG is used
Definition at line 47 of file random.C. References cps::k. Referenced by cps::QPropWRand::QPropWRand(). |
|
|
Loads the RNG state.
Definition at line 120 of file random.C. Referenced by cps::LatRanGen::SetState(). |
|
|
Number of Integers in RNG, that should be stored to record status.
Reimplemented in cps::GaussianRandomGenerator, and cps::UGrandomGenerator. |
|
|
Size of the RNG state.
Definition at line 131 of file random.C. Referenced by cps::LatRanGen::StateSize(). |
|
|
to store this object
Reimplemented in cps::GaussianRandomGenerator. |
|
|
Stores the RNG state.
Reimplemented in cps::UGrandomGenerator. Definition at line 104 of file random.C. Referenced by cps::UGrandomGenerator::StoreSeeds(). |
1.4.6