38 namespace Gecode {
namespace Int {
namespace Bool {
40 template<
class BVA,
class BVB>
45 template<
class BVA,
class BVB>
50 template<
class BVA,
class BVB>
56 template<
class BVA,
class BVB>
62 template<
class BVA,
class BVB>
71 }
else if (b0.one()) {
73 }
else if (b1.zero()) {
75 }
else if (b1.one()) {
86 template<
class BVA,
class BVB>
89 #define GECODE_INT_STATUS(S0,S1) \
90 ((BVA::S0<<(1*BVA::BITS))|(BVB::S1<<(0*BVB::BITS)))
91 switch ((x0.status() << (1*BVA::BITS)) | (x1.status() << (0*BVB::BITS))) {
114 #undef GECODE_INT_STATUS
130 return new (home)
NaryEq<BV>(home,share,*
this);
147 for (
int j=
i+1; j<
n; j++)
152 for (
int j=
i+1; j<
n; j++)
175 for (
int j=0; j<
i; j++)
177 for (
int j=i+1; j<
n; j++)
180 for (
int j=0; j<
i; j++)
182 for (
int j=i+1; j<
n; j++)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Base-class for propagators.
Propagation has computed fixpoint.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
void unique(const Space &home)
Remove all duplicate views from array (changes element order)
Base-class for both propagators and branchers.
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.
n-ary Boolean equality propagator
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Execution has resulted in failure.
Boolean equality propagator.
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Same variable but complement.
Node * x
Pointer to corresponding Boolean expression node.
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
bool assigned(View x, int v)
Whether x is assigned to value v.
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
int size(void) const
Return size of array (number of elements)
#define GECODE_INT_STATUS(S0, S1)
Gecode toplevel namespace
Base-class for binary Boolean propagators.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
#define GECODE_NEVER
Assert that this command is never executed.
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)