38 namespace Gecode {
namespace Search {
63 unsigned long int exp = 0U;
64 while ( (i >> (++exp)) > 1U ) {}
72 unsigned long int l =
log(i);
73 if (i == (1U<<(l+1))-1)
84 :
n(1.0),
scale(static_cast<double>(scale0)),
base(base0) {}
89 unsigned long int min0,
90 unsigned long int max0,
92 :
rnd(seed),
min(min0),
n(n0 == 0 ? (max0-
min+1U) : n0),
94 static_cast<unsigned long int>((max0-min0+1U)/
n))) {
101 : c1(d1), c2(d2),
n(n0) {}
104 delete c1;
delete c2;
113 delete c1;
delete c2;
119 :
c(c1),
i(0),
n(n0) {
const Gecode::FloatNum step
Cutoff(void)
Default constructor.
unsigned long int scale
Scale factor.
static const unsigned long int n_start
Number of pre-computed luby values.
virtual ~Cutoff(void)
Destructor.
Cutoff * c1
First cutoff generator.
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.
unsigned long int scale
Scale factor.
Base class for cutoff generators for restart-based meta engine.
unsigned long int n
Random values.
CutoffLuby(unsigned long int scale)
Constructor.
Gecode::FloatVal c(-8, 8)
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
virtual ~CutoffRepeat(void)
Destructor.
static Cutoff * rnd(unsigned int seed, unsigned long int min, unsigned long int max, unsigned long int n)
static unsigned long int start[n_start]
Precomputed luby-values.
unsigned long int cur
Current value.
unsigned long int i
Iteration number.
double n
Current cutoff 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.
const double base
Base for geometric restart sequence.
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.