40 namespace Gecode {
namespace Int {
namespace Rel {
56 }
else if (x1.assigned()) {
58 }
else if (
same(x0,x1)) {
61 (void)
new (home)
Nq<View>(home,x0,x1);
74 return new (home)
Nq<View>(home,share,*
this);
130 std::swap(x[0],x[
i]);
136 for (
int i=n-1;
i>0;
i--)
140 assert(x[
i].val() == v);
149 (void)
new (home)
NaryNq(home,x);
157 return sizeof(*this);
166 for (
int i=1;
true;
i++)
168 std::swap(
x[0],
x[
i]);
174 for (
int i=n-1;
i>0;
i--)
179 assert(
x[
i].val() == v);
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
static ExecStatus post(Home home, ViewArray< View > &x)
Post propagator .
ExecStatus ES_SUBSUMED(Propagator &p)
Nq(Space &home, bool share, Nq< View > &p)
Constructor for cloning p.
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)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Base-class for both propagators and branchers.
Nary disequality propagator.
bool same(const CachedView< View > &x, const CachedView< View > &y)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
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.
Execution has resulted in failure.
NaryNq(Home home, ViewArray< View > &x)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Node * x
Pointer to corresponding Boolean expression node.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Binary disequality propagator.
int size(void) const
Return size of array (number of elements)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode toplevel namespace
static ExecStatus post(Home home, View x0, View x1)
Post propagator .
int ModEventDelta
Modification event deltas.
Home class for posting propagators
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)