42 namespace Gecode {
namespace Search {
49 Cutoff::operator
new(
size_t s) {
53 Cutoff::operator
delete(
void*
p) {
70 :
i(1U), scale(scale0) {}
75 unsigned long int exp = 0U;
76 while ( (i >> (++exp)) > 1U ) {}
84 unsigned long int l =
log(i);
85 if (i == (1U<<(l+1))-1)
96 :
n(1.0), scale(static_cast<double>(scale0)), base(base0) {}
101 unsigned long int min0,
102 unsigned long int max0,
103 unsigned long int n0)
104 : rnd(seed),
min(min0),
n(n0 == 0 ? (max0-
min+1U) : n0),
106 static_cast<unsigned long int>((max0-min0+1U)/
n))) {
113 : c1(d1), c2(d2),
n(n0) {}
116 delete c1;
delete c2;
125 delete c1;
delete c2;
131 :
c(c1),
i(0),
n(n0) {
const Gecode::FloatNum step
Cutoff(void)
Default constructor.
static const unsigned long int n_start
Number of pre-computed luby values.
virtual ~Cutoff(void)
Destructor.
Cutoff * c1
First cutoff generator.
void rfree(void *p)
Free memory block starting at p.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
static unsigned long int luby(unsigned long int i)
Compute Luby number for step i.
virtual ~CutoffAppend(void)
Destructor.
void * ralloc(size_t s)
Allocate s bytes from heap.
Base class for cutoff generators for restart-based meta engine.
CutoffLuby(unsigned long int scale)
Constructor.
Heap heap
The single global heap.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
virtual ~CutoffRepeat(void)
Destructor.
static unsigned long int start[n_start]
Precomputed luby-values.
unsigned long int cur
Current value.
Cutoff * c2
Second cutoff generators.
static unsigned long int log(unsigned long int i)
Compute binary logarithm of i.
Cutoff * c1
First cutoff generators.
virtual ~CutoffMerge(void)
Destructor.
CutoffRandom(unsigned int seed, unsigned long int min, unsigned long int max, unsigned long int n)
Constructor.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Cutoff * c
Actual cutoff generator.
CutoffRepeat(Cutoff *c, unsigned long int n)
Constructor.
CutoffMerge(Cutoff *c1, Cutoff *c2)
Constructor.
CutoffGeometric(unsigned long int scale, double base)
Constructor.
CutoffConstant(unsigned long int c)
Constructor.
Gecode toplevel namespace
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Cutoff * c2
Second cutoff generator.
CutoffAppend(Cutoff *c1, unsigned long int n, Cutoff *c2)
Constructor.
#define GECODE_NEVER
Assert that this command is never executed.
CutoffLinear(unsigned long int scale)
Constructor.