40 namespace Gecode {
namespace Int {
namespace Arithmetic {
48 return new (home)
MultBnd(home,share,*
this);
64 if (
pos(
x2))
goto rewrite_ppp;
65 if (
neg(
x2))
goto rewrite_npn;
69 if (
pos(
x2))
goto rewrite_nnp;
70 if (
neg(
x2))
goto rewrite_pnn;
100 if (
pos(
x2))
goto rewrite_ppp;
101 if (
neg(
x2))
goto rewrite_pnn;
121 if (
pos(
x2))
goto rewrite_nnp;
122 if (
neg(
x2))
goto rewrite_npn;
158 if (
pos(x1) ||
pos(x2))
goto post_ppp;
159 if (
neg(x1) ||
neg(x2))
goto post_pnn;
160 }
else if (
neg(x0)) {
161 if (
neg(x1) ||
pos(x2))
goto post_nnp;
162 if (
pos(x1) ||
neg(x2))
goto post_npn;
163 }
else if (
pos(x1)) {
164 if (
pos(x2))
goto post_ppp;
165 if (
neg(x2))
goto post_npn;
166 }
else if (
neg(x1)) {
167 if (
pos(x2))
goto post_nnp;
168 if (
neg(x2))
goto post_pnn;
177 (void)
new (home)
MultBnd(home,x0,x1,x2);
202 return new (home)
MultDom(home,share,*
this);
227 if (
pos(
x2))
goto rewrite_ppp;
228 if (
neg(
x2))
goto rewrite_npn;
232 if (
pos(
x2))
goto rewrite_nnp;
233 if (
neg(
x2))
goto rewrite_pnn;
263 if (
pos(
x2))
goto rewrite_ppp;
264 if (
neg(
x2))
goto rewrite_pnn;
284 if (
pos(
x2))
goto rewrite_nnp;
285 if (
neg(
x2))
goto rewrite_npn;
311 return prop_mult_dom<IntView>(home,*
this,
x0,
x1,
x2);
325 if (
pos(x1) ||
pos(x2))
goto post_ppp;
326 if (
neg(x1) ||
neg(x2))
goto post_pnn;
327 }
else if (
neg(x0)) {
328 if (
neg(x1) ||
pos(x2))
goto post_nnp;
329 if (
pos(x1) ||
neg(x2))
goto post_npn;
330 }
else if (
pos(x1)) {
331 if (
pos(x2))
goto post_ppp;
332 if (
neg(x2))
goto post_npn;
333 }
else if (
neg(x1)) {
334 if (
pos(x2))
goto post_nnp;
335 if (
neg(x2))
goto post_pnn;
344 (void)
new (home)
MultDom(home,x0,x1,x2);
int val(void) const
Return assigned value (only if assigned)
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
bool any(const View &x)
Test whether x is neither positive nor negative.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
const FloatNum max
Largest allowed float value.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ExecStatus ES_NOFIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has not computed partial fixpoint
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
long long int mll(long long int x, long long int y)
Multiply x and .
IntType floor_div_xx(IntType x, IntType y)
Compute .
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
Base-class for both propagators and branchers.
int max(void) const
Return maximum of domain.
bool same(const CachedView< View > &x, const CachedView< View > &y)
Gecode::FloatVal c(-8, 8)
const FloatNum min
Smallest allowed float value.
MultDom(Space &home, bool share, MultDom &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Domain consistent positive multiplication propagator.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
Operations for square and square-root propagators.
int min(void) const
Return minimum of domain.
IntType floor_div_xp(IntType x, IntType y)
Compute where y is non-negative.
IntType ceil_div_xp(IntType x, IntType y)
Compute where y is non-negative.
IntType ceil_div_xx(IntType x, IntType y)
Compute .
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Integer view for integer variables.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
static ExecStatus post(Home home, IntView x0, IntView x1, IntView x2)
Post propagator .
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
bool pos(const View &x)
Test whether x is postive.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
bool assigned(void) const
Test whether view is assigned.
static ExecStatus post(Home home, IntView x0, IntView x1, Ops ops)
Post propagator.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
int med(void) const
Return median of domain (greatest element not greater than the median)
Propagation has not computed fixpoint.
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
bool neg(const View &x)
Test whether x is negative.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
Bounds consistent positive multiplication propagator.
MultBnd(Space &home, bool share, MultBnd &p)
Constructor for cloning p.