Gecode::Support::LinearCongruentialGenerator< m, a, q, r > Class Template Reference
[Support algorithms and datastructures]
#include <random.hh>
Detailed Description
template<unsigned int m, unsigned int a, unsigned int q, unsigned int r>
class Gecode::Support::LinearCongruentialGenerator< m, a, q, r >
Template for linear congruential generators.
This class template defines a simple class for linear congruential generators.
The values used for calculation shouldbe specified so that
Requires
#include "gecode/support/random.hh"
Definition at line 42 of file random.hh.
Public Member Functions | |
LinearCongruentialGenerator (int _seed=1) | |
Construct the generator instance. | |
void | seed (unsigned int _seed) |
Set the current seed. | |
unsigned int | seed (void) const |
Get the current seed. | |
unsigned int | operator() (unsigned int n) |
Returns a reandom integer from the interval [0..n). | |
Public Attributes | |
const unsigned long | rand_max |
Constructor & Destructor Documentation
|
Construct the generator instance.
|
Member Function Documentation
|
Set the current seed.
|
|
Get the current seed.
|
|
Returns a reandom integer from the interval [0..n).
|
Member Data Documentation
|
|
The documentation for this class was generated from the following file:
- gecode/support/random.hh (Revision: 3514)