Go to the documentation of this file.
38 namespace Gecode {
namespace Int {
namespace Bool {
40 template<
class BVA,
class BVB,
class BVC>
45 template<
class BVA,
class BVB,
class BVC>
50 template<
class BVA,
class BVB,
class BVC>
64 }
else if (
b1.zero()) {
71 }
else if (
b1.zero()) {
75 (void)
new (home)
Eqv(home,b0,
b1,
b2);
83 template<
class BVA,
class BVB,
class BVC>
89 template<
class BVA,
class BVB,
class BVC>
92 #define GECODE_INT_STATUS(S0,S1,S2) \
93 ((BVA::S0<<(2*BVA::BITS))|(BVB::S1<<(1*BVB::BITS))|(BVC::S2<<(0*BVC::BITS)))
94 switch ((x0.status() << (2*BVA::BITS)) | (x1.status() << (1*BVB::BITS)) |
95 (x2.status() << (0*BVC::BITS))) {
152 #undef GECODE_INT_STATUS
165 assert(
x.
size() >= 2);
178 return sizeof(*this);
Post propagator for SetVar x
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
bool assigned(void) const
Test whether view is assigned.
ExecStatus ES_SUBSUMED(Propagator &p)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
bool assigned(View x, int v)
Whether x is assigned to value v.
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
int pm2
Parity information mod 2.
#define GECODE_INT_STATUS(S0, S1, S2)
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Base-class for both propagators and branchers.
ViewArray< BoolView > x
Views not yet subscribed to.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Boolean view for Boolean variables.
Gecode toplevel namespace
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
void drop_fst(int i)
Drop views from positions 0 to i-1 from array.
Base-class for ternary Boolean propagators.
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Boolean n-ary equivalence propagator.
@ ES_FIX
Propagation has computed fixpoint.
Eqv(Space &home, bool share, Eqv &p)
Constructor for cloning p.
int size(void) const
Return size of array (number of elements)
Boolean equivalence propagator.
int val(void) const
Return assigned value (only if assigned)
void resubscribe(Space &home, BoolView &x0)
Update subscription.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
int n
Number of negative literals for node type.
@ ES_FAILED
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
@ BT_COMP
Same variable but complement.