40 template<
class View,
template<
class View0,
class View1>
class Eq>
52 }
else if (x0.max() <= 0) {
55 }
else if (x1.
val() == 0) {
59 int mp[2] = {-x1.
val(),x1.
val()};
77 if (-x1.min() < x0.min()) {
79 }
else if (x0.max() < x1.min()) {
96 }
else if (
x0.max() <= 0) {
99 assert(!
x0.assigned());
102 int mp[2] = {-
x1.val(),
x1.val()};
105 }
else if (
x0 !=
x1) {
151 }
else if (
x0.max() <= 0) {
154 assert(!
x0.assigned());
157 int mp[2] = {-
x1.val(),
x1.val()};
160 }
else if (
x0 !=
x1) {
203 Positive<ViewRanges<View> > p(i);
204 Negative<ViewRanges<View> > n(j);
Base-class for both propagators and branchers.
BinaryPropagator(Space &home, BinaryPropagator &p)
Home class for posting propagators
Bounds consistent absolute value propagator.
AbsBnd(Space &home, AbsBnd &p)
Constructor for cloning p.
static ExecStatus post(Home home, View x0, View x1)
Post bounds consistent propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Domain consistent absolute value propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
AbsDom(Space &home, AbsDom &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static ExecStatus post(Home home, View x0, View x1)
Post domain consistent propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
Range iterator for integer views.
Value iterator for array of integers
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
Base-class for propagators.
ModEventDelta med
A set of modification events (used during propagation)
Propagator for ternary union
static ExecStatus post(Home home, View0 x, View1 y)
Post propagator .
virtual Val val(const Space &home, View x, int i)=0
Return value of view x at position i.
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Numerical (arithmetic) propagators.
ExecStatus prop_abs_bnd(Space &home, Propagator &p, View x0, View x1)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.