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) {
unsigned long int n
How many number to take from the first.
Cutoff * c1
First cutoff generators.
virtual ~CutoffAppend(void)
Destructor.
Cutoff * c2
Second cutoff generators.
CutoffAppend(Cutoff *c1, unsigned long int n, Cutoff *c2)
Constructor.
unsigned long int c
Constant.
CutoffConstant(unsigned long int c)
Constructor.
double n
Current cutoff value.
CutoffGeometric(unsigned long int scale, double base)
Constructor.
double scale
Scale factor.
unsigned long int n
Next number in sequence.
CutoffLinear(unsigned long int scale)
Constructor.
unsigned long int scale
Scale factor.
static unsigned long int luby(unsigned long int i)
Compute Luby number for step i.
static const unsigned long int n_start
Number of pre-computed luby values.
CutoffLuby(unsigned long int scale)
Constructor.
static unsigned long int log(unsigned long int i)
Compute binary logarithm of i.
unsigned long int scale
Scale factor.
unsigned long int i
Iteration number.
static unsigned long int start[n_start]
Precomputed luby-values.
virtual ~CutoffMerge(void)
Destructor.
Cutoff * c1
First cutoff generator.
Cutoff * c2
Second cutoff generator.
CutoffMerge(Cutoff *c1, Cutoff *c2)
Constructor.
unsigned long int step
Step size.
unsigned long int cur
Current value.
CutoffRandom(unsigned int seed, unsigned long int min, unsigned long int max, unsigned long int n)
Constructor.
unsigned long int n
Random values.
Support::RandomGenerator rnd
Random number generator.
unsigned long int min
Minimum cutoff value.
CutoffRepeat(Cutoff *c, unsigned long int n)
Constructor.
Cutoff * c
Actual cutoff generator.
virtual ~CutoffRepeat(void)
Destructor.
virtual ~Cutoff(void)
Destructor.
Cutoff(void)
Default constructor.
Gecode toplevel namespace
void exp(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
#define GECODE_NEVER
Assert that this command is never executed.