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>
143 template<
class View, PropCond pc>
149 template<
class View, PropCond pc>
180 template<
class VA,
class VB,
class VC>
218 return x0.assigned() && x1.assigned() ?
222 template<
class VA,
class VB,
class VC>
228 template<
class VA,
class VB,
class VC>
234 template<
class VA,
class VB,
class VC>
240 template<
class VA,
class VB,
class VC>
243 return prop_mult_plus_bnd<VA,VB,VC>(home,*
this,
x0,
x1,
x2);
246 template<
class VA,
class VB,
class VC>
282 s0.support(); s1.support();
294 template<
class VA,
class VB,
class VC>
300 template<
class VA,
class VB,
class VC>
306 template<
class VA,
class VB,
class VC>
312 template<
class VA,
class VB,
class VC>
322 template<
class VA,
class VB,
class VC>
330 return prop_mult_dom<IntView>(home,*
this,y0,y1,y2);
333 template<
class VA,
class VB,
class VC>
IntType ceil_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
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.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
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 .
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 .
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
Propagation has computed fixpoint.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
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.
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.
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 Actor * copy(Space &home)
Copy propagator during cloning.
ModEventDelta med
A set of modification events (used during propagation)
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.
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
Post propagator for SetVar SetOpType SetVar SetRelType r
void support(void)
Mark current (iterator) value as supported.
Integer view for integer variables.
Post propagator for SetVar SetOpType SetVar y
MultZeroOne(Space &home, MultZeroOne< View, pc > &p)
Constructor for cloning p.
Bounds consistent multiplication propagator.
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.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Post propagator for SetVar x
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
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
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.