40namespace Gecode {
namespace Int {
namespace Arithmetic {
48 mll(
long long int x,
long long int y) {
54 return static_cast<long long int>(
x);
59 return static_cast<long long int>(
x) + 1;
64 return static_cast<long long int>(
x) - 1;
83 return (
x.min() <= 0) && (
x.max() >= 0);
92 template<
class View, PropCond pc>
97 template<
class View, PropCond pc>
107 template<
class View, PropCond pc>
110 switch (equal(x0,0)) {
117 switch (equal(x1,1)) {
134 template<
class View, PropCond pc>
139 template<
class View, PropCond pc>
145 template<
class View, PropCond pc>
148 switch (equal(x0,0)) {
155 switch (equal(x1,1)) {
176 template<
class VA,
class VB,
class VC>
214 return x0.assigned() && x1.assigned() ?
218 template<
class VA,
class VB,
class VC>
224 template<
class VA,
class VB,
class VC>
230 template<
class VA,
class VB,
class VC>
236 template<
class VA,
class VB,
class VC>
242 template<
class VA,
class VB,
class VC>
278 s0.support(); s1.support();
290 template<
class VA,
class VB,
class VC>
296 template<
class VA,
class VB,
class VC>
302 template<
class VA,
class VB,
class VC>
308 template<
class VA,
class VB,
class VC>
318 template<
class VA,
class VB,
class VC>
325 IntView y0(x0.varimp()), y1(x1.varimp()), y2(x2.varimp());
329 template<
class VA,
class VB,
class VC>
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
bool neg
Is atomic formula negative.
Base-class for both propagators and branchers.
Home class for posting propagators
Bounds consistent multiplication propagator.
MultBnd(Space &home, MultBnd &p)
Constructor for cloning p.
Domain consistent multiplication propagator.
MultDom(Space &home, MultDom &p)
Constructor for cloning p.
Bounds consistent positive multiplication propagator.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
MultPlusBnd(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Domain consistent positive multiplication propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, VA x0, VB x1, VC x2)
Post propagator .
MultPlusDom(Home home, VA x0, VB x1, VC x2)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Bounds or domain consistent propagator for .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
MultZeroOne(Space &home, MultZeroOne< View, pc > &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
static RelTest equal(View x, int n)
Test whether x is equal to n.
Integer view for integer variables.
Support value iterator and recorder
void support(void)
Mark current (iterator) value as supported.
ModEvent tell(Space &home)
Remove all unsupported values.
Mixed ternary propagator.
static PropCost ternary(PropCost::Mod m)
Three variables for modifier pcm.
Base-class for propagators.
ExecStatus ES_FIX_PARTIAL(Propagator &p, const ModEventDelta &med)
Propagator p has computed partial fixpoint
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
long long int dll(int x)
Decrement x by one.
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_plus_bnd(Space &home, Propagator &p, VA x0, VB x1, VC x2)
ExecStatus prop_mult_dom(Space &home, Propagator &p, View x0, View x1, View x2)
long long int ill(int x)
Increment x by one.
long long int ll(int x)
Cast x into a long long int.
IntType ceil_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
IntType floor_div_pp(IntType x, IntType y)
Compute where x and y are non-negative.
RelTest
Result of testing relation.
@ RT_TRUE
Relation does hold.
@ RT_MAYBE
Relation may hold or not.
@ RT_FALSE
Relation does not hold.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl=IPL_DEF)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
Post propagator for SetVar x
int ModEvent
Type for modification events.
#define GECODE_NEVER
Assert that this command is never executed.