36 template<
class BVA,
class BVB>
41 template<
class BVA,
class BVB>
46 template<
class BVA,
class BVB>
52 template<
class BVA,
class BVB>
58 template<
class BVA,
class BVB>
67 }
else if (b0.one()) {
69 }
else if (b1.zero()) {
71 }
else if (b1.one()) {
82 template<
class BVA,
class BVB>
85#define GECODE_INT_STATUS(S0,S1) \
86 ((BVA::S0<<(1*BVA::BITS))|(BVB::S1<<(0*BVB::BITS)))
87 switch ((
x0.status() << (1*BVA::BITS)) | (
x1.status() << (0*BVB::BITS))) {
110#undef GECODE_INT_STATUS
139 if (
x[i].assigned()) {
141 for (
int j=0; j<i; j++)
143 for (
int j=i+1; j<n; j++)
146 for (
int j=0; j<i; j++)
148 for (
int j=i+1; j<n; j++)
169 if (
x[i].assigned()) {
171 for (
int j=0; j<i; j++)
173 for (
int j=i+1; j<n; j++)
176 for (
int j=0; j<i; j++)
178 for (
int j=i+1; j<n; j++)
Base-class for both propagators and branchers.
Home class for posting propagators
BVB x1
Boolean view Constructor for posting.
BoolBinary(Home home, BVA b0, BVB b1)
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
NaryPropagator(Space &home, NaryPropagator &p)
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
Propagator(Home home)
Constructor for posting.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_INT_STATUS(S0, S1)
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
@ BT_COMP
Same variable but complement.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
#define GECODE_NEVER
Assert that this command is never executed.