#include <random.h>
Inherits cps::RandomGenerator.
Inherited by cps::UGrandomGenerator.
Public Member Functions | |
| GaussianRandomGenerator (IFloat s2=1.0) | |
| ~GaussianRandomGenerator () | |
| IFloat | Rand (int noexit=0) |
| int | RNGints () const |
| Number of Integers in RNG, that should be stored to record status. | |
| int | RNGIFloats () const |
| void | store (int *buf) |
| to store this object | |
| void | load (int *buf) |
| to load from file | |
Static Public Member Functions | |
| void | SetSigma (IFloat s2) |
| Sets the variance of the distribution. | |
The mean of the distribution is 0; the variance is defined in the constructor. It is based on the Box-Muller algorithm (see "Numerical Recipes in C" pp.289).
This should be inherited by UGrandomGenerator class rather than used directly.
Definition at line 165 of file random.h.
|
|
The default variance is 1.0.
|
|
|
|
|
|
to load from file
Reimplemented from cps::RandomGenerator. Definition at line 204 of file random.h. References cps::ERR, and cps::Error::General(). Referenced by cps::SerialIO::load(), cps::ParallelIO::load(), cps::SerialIO::store(), and cps::ParallelIO::store(). |
|
|
Definition at line 71 of file random_asm.C. References cps::ERR, cps::MPISCU::fprintf(), cps::Error::General(), cps::IFloat, cps::Verbose::Result(), and cps::VRB. |
|
|
|
|
|
Number of Integers in RNG, that should be stored to record status.
Reimplemented from cps::RandomGenerator. Reimplemented in cps::UGrandomGenerator. |
|
|
Sets the variance of the distribution.
Reimplemented in cps::UGrandomGenerator. |
|
|
to store this object
Reimplemented from cps::RandomGenerator. Definition at line 195 of file random.h. References cps::ERR, and cps::Error::General(). Referenced by cps::SerialIO::store(), and cps::ParallelIO::store(). |
1.3.9.1