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);
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
BVC x2
Boolean view Constructor for posting.
ExecStatus ES_SUBSUMED(Propagator &p)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Eqv(Space &home, bool share, Eqv &p)
Constructor for cloning p.
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Boolean equivalence propagator.
Execution has resulted in failure.
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Boolean equality propagator.
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
void drop_fst(int i)
Drop views from positions 0 to i-1 from array.
Boolean n-ary equivalence propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
Same variable but complement.
#define GECODE_INT_STATUS(S0, S1, S2)
bool assigned(void) const
Test whether view is assigned.
bool assigned(View x, int v)
Whether x is assigned to value v.
ViewArray< BoolView > x
Views not yet subscribed to.
Post propagator for SetVar x
Gecode toplevel namespace
Base-class for ternary Boolean propagators.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
int pm2
Parity information mod 2.
int val(void) const
Return assigned value (only if assigned)
#define GECODE_NEVER
Assert that this command is never executed.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
Boolean view for Boolean variables.