34namespace Gecode {
namespace Int {
namespace Distinct {
66#define GECODE_INT_HALL_ONE(x0,x1,x2) \
67 if (x0.assigned()) { \
68 GECODE_ME_CHECK(x1.nq(home,x0.val())); \
69 GECODE_ME_CHECK(x2.nq(home,x0.val())); \
70 if (x1.assigned()) { \
71 GECODE_ME_CHECK(x2.nq(home,x1.val())); \
72 return home.ES_SUBSUMED(*this); \
74 if (x2.assigned()) { \
75 GECODE_ME_CHECK(x1.nq(home,x2.val())); \
76 return home.ES_SUBSUMED(*this); \
83#define GECODE_INT_HALL_TWO(x0,x1,x2) \
84 if ((x0.size() == 2) && (x1.size() == 2) && \
85 (x0.min() == x1.min()) && (x0.max() == x1.max())) { \
86 GECODE_ME_CHECK(x2.nq(home,x0.min())); \
87 GECODE_ME_CHECK(x2.nq(home,x0.max())); \
103#undef GECODE_INT_HALL_ONE
104#undef GECODE_INT_HALL_TWO
int p
Number of positive literals for node type.
Base-class for both propagators and branchers.
Home class for posting propagators
Ternary domain consistent distinct propagator.
TerDom(Space &home, TerDom< View > &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, View x0, View x1, View x2)
Post propagator for views x.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int ModEventDelta
Modification event deltas.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
#define GECODE_INT_HALL_ONE(x0, x1, x2)
Check whether x0 forms a Hall set of cardinality one.
#define GECODE_INT_HALL_TWO(x0, x1, x2)
Check whether x0 and x1 form a Hall set of cardinality two.