40 namespace Gecode {
namespace Float {
namespace Rel {
47 template<
class View0,
class View1>
52 template<
class View0,
class View1>
57 }
else if (x1.assigned()) {
59 }
else if (!
same(x0,x1)) {
69 template<
class View0,
class View1>
74 template<
class View0,
class View1>
81 template<
class View0,
class View1>
87 template<
class View0,
class View1>
92 }
else if (
x1.assigned()) {
98 }
while (
x0.min() !=
x1.min());
102 }
while (
x0.max() !=
x1.max());
106 assert(
x0.assigned() &&
x1.assigned());
127 }
else if (x.
size() > 2) {
130 for (
int i=x.
size();
i-- > 1; ) {
134 for (
int i=x.
size();
i--; ) {
166 assert(
x.size() > 2);
169 for (
int i = 0; ;
i++)
173 for (
int j =
x.size(); j--; )
182 for (
int i =
x.size();
i--; ) {
184 if (mn <
x[
i].
min()) {
191 for (
int i =
x.size();
i--; ) {
193 if (mx >
x[
i].
max()) {
208 template<
class View,
class CtrlView, ReifyMode rm>
213 template<
class View,
class CtrlView, ReifyMode rm>
227 (void)
new (home)
ReEq(home,x0,x1,b);
228 }
else if (rm !=
RM_IMP) {
235 template<
class View,
class CtrlView, ReifyMode rm>
240 template<
class View,
class CtrlView, ReifyMode rm>
246 template<
class View,
class CtrlView, ReifyMode rm>
281 template<
class View,
class CtrlView, ReifyMode rm>
287 template<
class View,
class CtrlView, ReifyMode rm>
293 }
else if (x.assigned()) {
308 template<
class View,
class CtrlView, ReifyMode rm>
313 template<
class View,
class CtrlView, ReifyMode rm>
319 template<
class View,
class CtrlView, ReifyMode rm>
Reified binary bounds consistent equality propagator.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
Inverse implication for reification.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
ExecStatus ES_SUBSUMED(Propagator &p)
const FloatNum max
Largest allowed float value.
View0 x0
View of type View0.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
bool overlap(const FloatVal &x, const FloatVal &y)
Reified binary propagator.
Binary bounds consistent equality propagator.
ViewArray< View > x
Array of views.
Base-class for propagators.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::ModEvent ME_FLOAT_VAL
Domain operation has resulted in a value (assigned variable)
Propagation has computed fixpoint.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
View1 x1
View of type View1.
void unique(const Space &home)
Remove all duplicate views from array (changes element order)
NaryEq(Space &home, bool share, NaryEq< View > &p)
Constructor for cloning p.
static ExecStatus post(Home home, View x, FloatVal c, CtrlView b)
Post bounds consistent propagator .
Base-class for both propagators and branchers.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Reified bounds consistent equality with float propagator.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
Binary bounds consistent disequality propagator.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
bool same(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether two views are the same.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Eq(Space &home, bool share, Eq< View0, View1 > &p)
Constructor for cloning p.
ModEventDelta med
A set of modification events (used during propagation)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
static ExecStatus post(Home home, ViewArray< View > &x)
Post bounds consistent propagator .
union Gecode::@519::NNF::@60 u
Union depending on nodetype t.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
struct Gecode::@519::NNF::@60::@61 b
For binary nodes (and, or, eqv)
RelTest rtest_eq(View x, View y)
Test whether views x and y are equal.
Node * x
Pointer to corresponding Boolean expression node.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool assigned(View x, int v)
Whether x is assigned to value v.
static ExecStatus post(Home home, View x0, View x1, CtrlView b)
Post bounds consistent propagator .
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ReEqFloat(Space &home, bool share, ReEqFloat &p)
Constructor for cloning p.
const Gecode::PropCond PC_FLOAT_BND
Propagate when minimum or maximum of a view changes.
FloatVal c
Float constant to check.
Gecode toplevel namespace
ReEq(Space &home, bool share, ReEq &p)
Constructor for cloning p.
Implication for reification.
n-ary bounds consistent equality propagator
CtrlView b
Boolean control view.
Relation may hold or not.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
double FloatNum
Floating point number base type.
#define GECODE_NEVER
Assert that this command is never executed.