44 return new (home)
MultBnd(home,*
this);
60 if (
pos(
x2))
goto rewrite_ppp;
61 if (
neg(
x2))
goto rewrite_npn;
65 if (
pos(
x2))
goto rewrite_nnp;
66 if (
neg(
x2))
goto rewrite_pnn;
77 assert((
x0.val() == 0) && (
x2.val() == 0));
82 assert((
x1.val() == 0) && (
x2.val() == 0));
96 if (
pos(
x2))
goto rewrite_ppp;
97 if (
neg(
x2))
goto rewrite_pnn;
102 if (
x0.assigned() &&
x1.assigned()) {
117 if (
pos(
x2))
goto rewrite_nnp;
118 if (
neg(
x2))
goto rewrite_npn;
123 if (
x0.assigned() &&
x1.assigned()) {
156 }
else if (
neg(
x0)) {
159 }
else if (
pos(
x1)) {
160 if (
pos(
x2))
goto post_ppp;
161 if (
neg(
x2))
goto post_npn;
162 }
else if (
neg(
x1)) {
163 if (
pos(
x2))
goto post_nnp;
164 if (
neg(
x2))
goto post_pnn;
167 long long int a =
mll(
x0.min(),
x1.min());
168 long long int b =
mll(
x0.min(),
x1.max());
169 long long int c =
mll(
x0.max(),
x1.min());
170 long long int d =
mll(
x0.max(),
x1.max());
198 return new (home)
MultDom(home,*
this);
223 if (
pos(
x2))
goto rewrite_ppp;
224 if (
neg(
x2))
goto rewrite_npn;
228 if (
pos(
x2))
goto rewrite_nnp;
229 if (
neg(
x2))
goto rewrite_pnn;
240 assert((
x0.val() == 0) && (
x2.val() == 0));
245 assert((
x1.val() == 0) && (
x2.val() == 0));
259 if (
pos(
x2))
goto rewrite_ppp;
260 if (
neg(
x2))
goto rewrite_pnn;
265 if (
x0.assigned() &&
x1.assigned()) {
280 if (
pos(
x2))
goto rewrite_nnp;
281 if (
neg(
x2))
goto rewrite_npn;
286 if (
x0.assigned() &&
x1.assigned()) {
323 }
else if (
neg(
x0)) {
326 }
else if (
pos(
x1)) {
327 if (
pos(
x2))
goto post_ppp;
328 if (
neg(
x2))
goto post_npn;
329 }
else if (
neg(
x1)) {
330 if (
pos(
x2))
goto post_nnp;
331 if (
neg(
x2))
goto post_pnn;
334 long long int a =
mll(
x0.min(),
x1.min());
335 long long int b =
mll(
x0.min(),
x1.max());
336 long long int c =
mll(
x0.max(),
x1.min());
337 long long int d =
mll(
x0.max(),
x1.max());
Base-class for both propagators and branchers.
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
Bounds consistent positive multiplication propagator.
Domain consistent positive multiplication propagator.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
Operations for square and square-root propagators.
Integer view for integer variables.
int med(void) const
Return median of domain (greatest element not greater than the median)
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
ModEventDelta med
A set of modification events (used during propagation)
static ModEvent me(const ModEventDelta &med)
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.
Numerical (arithmetic) propagators.
bool pos(const View &x)
Test whether x is postive.
bool any(const View &x)
Test whether x is neither positive nor negative.
long long int mll(long long int x, long long int y)
Multiply x and \y.
ExecStatus prop_mult_dom(Space &home, Propagator &p, View x0, View x1, View x2)
bool neg(const View &x)
Test whether x is negative.
IntType ceil_div_xp(IntType x, IntType y)
Compute where y is non-negative.
IntType floor_div_xp(IntType x, IntType y)
Compute where y is non-negative.
IntType floor_div_xx(IntType x, IntType y)
Compute .
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
IntType ceil_div_xx(IntType x, IntType y)
Compute .
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_NOFIX
Propagation has not computed fixpoint.