#include <PM_LCG.h>
Inheritance diagram for PM_LCG::

Public Methods | |
| PM_LCG (int seed=0) | |
| Constructor. More... | |
| void | reseed (int seed) |
| Reseed the rng with a new seed value. | |
| int | getSeed () |
| Returns the seed used to initialize the rng. | |
| virtual void | reset () |
| Reset the number generator to prepare it for use. | |
| virtual unsigned long | asLong () |
| Return a long in 0 ... LONG_MAX. | |
| virtual double | asDouble () |
| Return double in [0,1[. | |
| virtual int | write (std::ostream &output) const |
| Write the rng state to an output stream. | |
| virtual int | read (std::istream &input) |
| Read an rng state from an input stream. | |
Private Attributes | |
| int | state |
| The state for this rng. | |
| int | jseed |
| Use to initialize the generator. More... | |
This rng is implemented in PMrand function.
|
|
Constructor. If no argument is provided, the seed is set to zero, so the rng * is initialized with the current time information. |
|
|
Use to initialize the generator. If zero, time is used to generate the random seed. |