Generated on Mon Aug 25 11:35:54 2008 for Gecode by doxygen 1.5.6

Gecode::Support::LinearCongruentialGenerator< m, a, q, r > Class Template Reference
[Support algorithms and datastructures]

List of all members.


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.

Definition at line 50 of file random.icc.


Public Member Functions

void seed (unsigned int _s)
 Set the current seed.
 LinearCongruentialGenerator (unsigned int _s=1)
 Construct the generator instance.
unsigned int seed (void) const
 Return current seed.
unsigned int operator() (unsigned int n)
 Returns a random integer from the interval [0..n).

Constructor & Destructor Documentation

template<unsigned int m, unsigned int a, unsigned int q, unsigned int r>
Gecode::Support::LinearCongruentialGenerator< m, a, q, r >::LinearCongruentialGenerator ( unsigned int  _s = 1  )  [inline]

Construct the generator instance.

Definition at line 86 of file random.icc.


Member Function Documentation

template<unsigned int m, unsigned int a, unsigned int q, unsigned int r>
void Gecode::Support::LinearCongruentialGenerator< m, a, q, r >::seed ( unsigned int  _s  )  [inline]

Set the current seed.

Definition at line 79 of file random.icc.

template<unsigned int m, unsigned int a, unsigned int q, unsigned int r>
unsigned int Gecode::Support::LinearCongruentialGenerator< m, a, q, r >::seed ( void   )  const [inline]

Return current seed.

Definition at line 91 of file random.icc.

template<unsigned int m, unsigned int a, unsigned int q, unsigned int r>
unsigned int Gecode::Support::LinearCongruentialGenerator< m, a, q, r >::operator() ( unsigned int  n  )  [inline]

Returns a random integer from the interval [0..n).

Definition at line 96 of file random.icc.


The documentation for this class was generated from the following file: