42 namespace Gecode {
namespace Int {
namespace Arithmetic {
44 template<
class View,
template<
class View0,
class View1>
class Eq>
56 }
else if (x0.max() <= 0) {
59 }
else if (x1.val() == 0) {
63 int mp[2] = {-x1.val(),x1.val()};
82 template<
class View, PropCond pc>
87 template<
class View, PropCond pc>
95 }
else if (x0.max() <= 0) {
101 assert(!x0.assigned());
104 int mp[2] = {-x1.val(),x1.val()};
107 }
else if (!
same(x0,x1)) {
116 template<
class View, PropCond pc>
121 template<
class View, PropCond pc>
127 template<
class View, PropCond pc>
137 template<
class View, PropCond pc>
140 return prop_abs_bnd<View,Rel::EqBnd>(home, *
this,
x0,
x1);
155 }
else if (x0.max() <= 0) {
158 assert(!x0.assigned());
161 int mp[2] = {-x1.val(),x1.val()};
164 }
else if (!
same(x0,x1)) {
206 using namespace Iter::Ranges;
207 Positive<ViewRanges<View> >
p(
i);
208 Negative<ViewRanges<View> >
n(j);
221 using namespace Iter::Ranges;
static ExecStatus post(Home home, View x0, View x1)
Post bounds consistent propagator .
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
AbsBnd(Space &home, bool share, AbsBnd &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Binary domain consistent equality propagator.
ExecStatus ES_SUBSUMED(Propagator &p)
const FloatNum max
Largest allowed float value.
Propagator for ternary union
Value iterator for array of integers
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
static ExecStatus post(Home home, View0 x0, View1 x1)
Post domain consistent propagator .
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
ExecStatus prop_abs_bnd(Space &home, Propagator &p, View x0, View x1)
Base-class for propagators.
Propagation has computed fixpoint.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
Base-class for both propagators and branchers.
Range iterator for integer views.
Bounds consistent absolute value propagator.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post bounds consistent propagator .
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool same(const CachedView< View > &x, const CachedView< View > &y)
static ExecStatus post(Home home, View x0, View x1)
Post domain consistent propagator .
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.
union Gecode::@554::NNF::@60 u
Union depending on nodetype t.
Domain consistent absolute value propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
ModEventDelta med
A set of modification events (used during propagation)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
static ExecStatus post(Home home, View0 x0, View1 x1)
Post value propagation propagator .
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
Propagator for set equality
Propagation has not computed fixpoint.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators
AbsDom(Space &home, bool share, AbsDom &p)
Constructor for cloning p.
static PropCost binary(PropCost::Mod m)
Two variables for modifier pcm.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)