#include <random.h>
Inherits cps::UniformRandomGenerator, and cps::GaussianRandomGenerator.
Public Member Functions | |
| UGrandomGenerator () | |
| IFloat | Grand (int noexit=0) |
| Get a gaussian random number. | |
| IFloat | Urand () |
| Get a uniform random number. | |
| IFloat | Urand (Float high, Float low) |
| void | SetInterval (IFloat high, IFloat low) |
| Sets the interval over which the uniform distribution is defined. | |
| void | SetSigma (IFloat s2) |
| Sets the variance of the distribution. | |
| int | RNGints () const |
| Number of Integers in RNG, that should be stored to record status. | |
| void | StoreSeeds (unsigned int *to) const |
| Stores the RNG state. | |
For each 2^4 hypercube there is a uniform RNG and a gaussian RNG. They should be accessed through the LatRanGen class rather than directly.
Definition at line 225 of file random.h.
|
|
|
|
|
Get a gaussian random number.
Definition at line 234 of file random.h. References cps::IFloat. Referenced by cps::LatRanGen::Grand(), cps::SerialIO::load(), cps::ParallelIO::load(), cps::SerialIO::store(), and cps::ParallelIO::store(). |
|
|
Number of Integers in RNG, that should be stored to record status.
Reimplemented from cps::GaussianRandomGenerator. Definition at line 258 of file random.h. Referenced by cps::LatRngRead::read(), and cps::LatRngWrite::write(). |
|
||||||||||||
|
Sets the interval over which the uniform distribution is defined. The default range is (-0.5, 0.5).
Reimplemented from cps::UniformRandomGenerator. |
|
|
Sets the variance of the distribution. The default variance is 1.0 (and the mean is zero).
Reimplemented from cps::GaussianRandomGenerator. |
|
|
Stores the RNG state.
Reimplemented from cps::RandomGenerator. Definition at line 111 of file random.C. Referenced by cps::LatRanGen::GetState(), and cps::LatRanGen::GetStates(). |
|
||||||||||||
|
Definition at line 238 of file random.h. References cps::IFloat. |
|
|
Get a uniform random number.
Definition at line 237 of file random.h. References cps::IFloat. Referenced by cps::LatRanGen::Lrand(), and cps::LatRanGen::Urand(). |
1.3.9.1