55 unsigned int seed(
void)
const;
57 void seed(
unsigned int s);
59 unsigned int operator ()(
unsigned int n);
64 void _seed(
unsigned int s);
83 void seed(
unsigned int s);
91 unsigned int seed(
void)
const;
97 Rnd::IMP::seed(
void)
const {
99 const_cast<Rnd::IMP&
>(*this).m.acquire();
101 const_cast<Rnd::IMP&
>(*this).m.release();
105 Rnd::IMP::seed(
unsigned int s) {
111 Rnd::IMP::operator ()(
unsigned int n) {
121 const IMP* i =
static_cast<const IMP*
>(
object());
126 IMP* i =
static_cast<IMP*
>(
object());
unsigned int seed(void) const
Return current seed.
Rnd & operator=(const Rnd &r)
Assignment operator.
void time(void)
Set current seed based on time (initializes if needed)
unsigned int operator()(unsigned int n)
Return a random integer from the interval [0..n)
Rnd(void)
Default constructor that does not initialize the generator.
void hw(void)
Set current seed to hardware-based random number (initializes if needed)
SharedHandle(void)
Create shared handle with no object pointing to.
SharedHandle::Object * object(void) const
Access to the shared object.
void seed(unsigned int s)
Set the current seed to s.
A mutex for mutual exclausion among several threads.
LinearCongruentialGenerator< 2147483647, 48271, 44488, 3399 > RandomGenerator
Default values for linear congruential generator.
#define GECODE_KERNEL_EXPORT
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r