55 unsigned int seed(
void)
const;
57 void seed(
unsigned int s);
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.
void time(void)
Set current seed based on time (initializes if needed)
Rnd(void)
Default constructor that does not initialize the generator.
A mutex for mutual exclausion among several threads.
Rnd & operator=(const Rnd &r)
Assignment operator.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
SharedHandle::Object * object(void) const
Access to the shared object.
Template for linear congruential generators.
#define GECODE_KERNEL_EXPORT
unsigned int operator()(unsigned int n)
Return a random integer from the interval [0..n)
Post propagator for SetVar SetOpType SetVar SetRelType r
void hw(void)
Set current seed to hardware-based random number (initializes if needed)
Gecode toplevel namespace