Go to the documentation of this file.
34 namespace Gecode {
namespace Int {
namespace Bool {
36 template<
class BVA,
class BVB,
class BVC>
41 template<
class BVA,
class BVB,
class BVC>
46 template<
class BVA,
class BVB,
class BVC>
60 }
else if (
b1.zero()) {
67 }
else if (
b1.zero()) {
71 (void)
new (home)
Eqv(home,b0,
b1,
b2);
79 template<
class BVA,
class BVB,
class BVC>
85 template<
class BVA,
class BVB,
class BVC>
88 #define GECODE_INT_STATUS(S0,S1,S2) \
89 ((BVA::S0<<(2*BVA::BITS))|(BVB::S1<<(1*BVB::BITS))|(BVC::S2<<(0*BVC::BITS)))
90 switch ((x0.status() << (2*BVA::BITS)) | (x1.status() << (1*BVB::BITS)) |
91 (x2.status() << (0*BVC::BITS))) {
148 #undef GECODE_INT_STATUS
161 assert(
x.
size() >= 2);
174 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)
Eqv(Space &home, Eqv &p)
Constructor for cloning p.
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.
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.
Base-class for both propagators and branchers.
ViewArray< BoolView > x
Views not yet subscribed to.
Boolean view for Boolean variables.
Gecode toplevel namespace
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
Home class for posting propagators
Boolean equality propagator.
#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)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Boolean n-ary equivalence propagator.
Propagation has computed fixpoint.
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.
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
Gecode::IntArgs i({1, 2, 3, 4})
int p
Number of positive literals for node type.
Same variable but complement.