
Template for linear congruential generators. More...
#include <random.hpp>
Public Member Functions | |
| void | seed (unsigned int s) |
| Set the current seed to s. More... | |
| LinearCongruentialGenerator (unsigned int s=1) | |
| Construct the generator instance with seed s. More... | |
| unsigned int | seed (void) const |
| Return current seed. More... | |
| unsigned int | operator() (unsigned int n) |
| Returns a random integer from the interval [0..n) More... | |
| size_t | size (void) const |
| Report size occupied. More... | |
Template for linear congruential generators.
This class template defines a simple class for linear congruential generators.
Definition at line 50 of file random.hpp.
|
inline |
Construct the generator instance with seed s.
Definition at line 88 of file random.hpp.
|
inline |
Set the current seed to s.
Definition at line 81 of file random.hpp.
|
inline |
Return current seed.
Definition at line 93 of file random.hpp.
|
inline |
Returns a random integer from the interval [0..n)
Definition at line 98 of file random.hpp.
|
inline |
Report size occupied.
Definition at line 108 of file random.hpp.