70 void seed(
unsigned int s);
76 unsigned int seed(
void)
const;
84 Rnd::IMP::IMP(
unsigned int s)
88 Rnd::IMP::~IMP(
void) {}
97 seed(static_cast<unsigned int>(::
time(NULL)));
105 const IMP*
i =
static_cast<const IMP*
>(
object());
110 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.
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)
void hw(void)
Set current seed to hardware-based random number (initializes if needed)
bool initialized(void) const
Test whether generator has been properly initialized.
Gecode toplevel namespace
unsigned int hwrnd(void)
Return hardware generated random number.