ppALIGN API documentation
DRand48 Class Reference
#include <drand48.hpp>
Public Member Functions | |
| DRand48 (long _seed) | |
| DRand48 (const DRand48 &rand) | |
| double | operator() () |
| void | seed (long seed) |
| void | seed (const std::string &seed_str) |
| DRand48 & | operator= (const DRand48 &rand) |
Friends | |
| std::ostream & | operator<< (std::ostream &ost, const DRand48 &r) |
| std::istream & | operator>> (std::istream &ost, DRand48 &r) |
Detailed Description
A drand48 wrapper
- Examples:
Definition at line 38 of file drand48.hpp.
Constructor & Destructor Documentation
| DRand48::DRand48 | ( | long | _seed | ) | [inline] |
init from seed. The initializer function srand48() sets the high-order 32 bits of X_i to the low-order 32 bits contained in its argument. The low-order 16 bits of X_i are set to the arbitrary value 330E_16
Definition at line 47 of file drand48.hpp.
| DRand48::DRand48 | ( | const DRand48 & | rand | ) | [inline] |
init from other obejct
Definition at line 63 of file drand48.hpp.
Member Function Documentation
| double DRand48::operator() | ( | ) | [inline] |
random number
Definition at line 102 of file drand48.hpp.
| void DRand48::seed | ( | const std::string & | seed_str | ) | [inline] |
seed from string, either a single numberical value or in the format dddd.dddd.dddd, which is the output of operator<<(std::ostream & ost, const DRand48 & r); set drand
Definition at line 122 of file drand48.hpp.
| void DRand48::seed | ( | long | seed | ) | [inline] |
new seed for RNG
Definition at line 115 of file drand48.hpp.
Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | ost, | |
| const DRand48 & | r | |||
| ) | [friend] |
outstream internal state
| std::istream& operator>> | ( | std::istream & | ost, | |
| DRand48 & | r | |||
| ) | [friend] |
instream internal state
The documentation for this class was generated from the following file:
- src/drand48.hpp