44 namespace Gecode {
namespace Int {
namespace Arithmetic {
52 mll(
long long int x,
long long int y) {
58 return static_cast<long long int>(
x);
63 return static_cast<long long int>(
x) + 1;
68 return static_cast<long long int>(
x) - 1;
87 return (x.min() <= 0) && (x.max() >= 0);
96 template<
class View, PropCond pc>
101 template<
class View, PropCond pc>
111 template<
class View, PropCond pc>
114 switch (
equal(x0,0)) {
121 switch (
equal(x1,1)) {
138 template<
class View, PropCond pc>
144 template<
class View, PropCond pc>
150 template<
class View, PropCond pc>
153 switch (
equal(x0,0)) {
160 switch (
equal(x1,1)) {
181 template<
class VA,
class VB,
class VC>
219 return x0.assigned() && x1.assigned() ?
223 template<
class VA,
class VB,
class VC>
229 template<
class VA,
class VB,
class VC>
236 template<
class VA,
class VB,
class VC>
242 template<
class VA,
class VB,
class VC>
245 return prop_mult_plus_bnd<VA,VB,VC>(home,*
this,x0,x1,x2);
248 template<
class VA,
class VB,
class VC>
284 s0.support(); s1.support();
296 template<
class VA,
class VB,
class VC>
302 template<
class VA,
class VB,
class VC>
309 template<
class VA,
class VB,
class VC>
315 template<
class VA,
class VB,
class VC>
325 template<
class VA,
class VB,
class VC>
332 IntView y0(x0.varimp()), y1(x1.varimp()), y2(x2.varimp());
333 return prop_mult_dom<IntView>(home,*
this,y0,y1,y2);
336 template<
class VA,
class VB,
class VC>
IntType ceil_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
Relation may hold or not.
bool any(const View &x)
Test whether x is neither positive nor negative.
ModEvent tell(Space &home)
Remove all unsupported values.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntConLevel icl)
Post propagator for .
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
MultZeroOne(Space &home, bool share, MultZeroOne< View, pc > &p)
Constructor for cloning p.
long long int ll(int x)
Cast x into a long long int.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
int ModEvent
Type for modification events.
Base-class for propagators.
long long int mll(long long int x, long long int y)
Multiply x and .
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
long long int ill(int x)
Increment x by one.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
ExecStatus prop_mult_dom(Space &home, Propagator &p, View x0, View x1, View x2)
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
MultDom(Space &home, bool share, MultDom &p)
Constructor for cloning p.
Execution has resulted in failure.
ExecStatus prop_mult_plus_bnd(Space &home, Propagator &p, VA x0, VB x1, VC x2)
Domain consistent positive multiplication propagator.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
RelTest
Result of testing relation.
Mixed ternary propagator.
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
IntType floor_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
static RelTest equal(View x, int n)
Test whether x is equal to n.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
RelTest rtest_eq_dom(View x, View y)
Test whether views x and y are equal (use full domain information)
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
void support(void)
Mark current (iterator) value as supported.
Integer view for integer variables.
Bounds consistent multiplication propagator.
Node * x
Pointer to corresponding Boolean expression node.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
bool pos(const View &x)
Test whether x is postive.
MultPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
long long int dll(int x)
Decrement x by one.
RelTest rtest_eq_bnd(View x, View y)
Test whether views x and y are equal (use bounds information)
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
Gecode toplevel namespace
Bounds or domain consistent propagator for .
Domain consistent multiplication propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
Support value iterator and recorder
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
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.