38 template<
class SView,
class RView>
49 template<
class SView,
class RView>
58 template<
class SView,
class RView>
72 template<
class SView,
class RView>
78 template<
class SView,
class RView>
85 template<
class SView,
class RView>
94 template<
class SView,
class RView>
100 template<
class SView,
class RView>
107 bool fix_flag =
false;
114 for(
int i=0; vx1lb(); ++vx1lb) {
115 while (
iv[i].idx < vx1lb.
val()) i++;
127 if (
iv[i].idx < vx1ub.
val()) {
139 for (
int k=i; k<n; k++) {
154 while (
iv[i].idx < vx1u.
val()) {
158 assert(
iv[i].idx == vx1u.
val());
160 SView candidate =
iv[i].view;
161 int candidateInd =
iv[i].idx;
185 for (
int k=i; k<n; k++) {
193 if (
x1.cardMax()==0) {
204 for (; vx1lb(); ++vx1lb) {
205 while (
iv[i].idx < vx1lb.
val()) i++;
206 assert(
iv[i].idx==vx1lb.
val());
209 for (
int j=0; vx1lb2(); ++vx1lb2) {
210 while (
iv[j].idx < vx1lb2.
val()) j++;
211 assert(
iv[j].idx==vx1lb2.
val());
212 if (
iv[i].idx!=
iv[j].idx) {
225 if (
x1.cardMin()-
x1.glbSize() > 1) {
231 for (; vx1u() &&
x1.cardMin()-
x1.glbSize() > 1; ++vx1u) {
233 while (
iv[i].idx < vx1u.
val()) i++;
234 assert(
iv[i].idx == vx1u.
val());
239 for (; vx1u2(); ++vx1u2) {
241 while (
iv[j].idx < vx1u2.
val()) j++;
242 assert(
iv[j].idx == vx1u2.
val());
243 if (
iv[i].idx!=
iv[j].idx) {
271 for (;
x1.cardMin()-
x1.glbSize() == 2 && vx1u(); ++vx1u) {
273 while (
iv[i].idx < vx1u.
val()) i++;
274 assert (
iv[i].idx == vx1u.
val());
279 for (; vx1u2(); ++vx1u2) {
281 while (
iv[j].idx < vx1u2.
val()) j++;
282 assert (
iv[j].idx == vx1u2.
val());
283 if (
iv[i].idx!=
iv[j].idx) {
286 for (; vx1u3(); ++vx1u3) {
288 while (
iv[k].idx < vx1u3.
val()) k++;
289 assert (
iv[k].idx == vx1u3.
val());
290 if (
iv[j].idx!=
iv[k].idx &&
iv[i].idx!=
iv[k].idx) {
312 for (
int i=
iv.size(); i--;)
313 if (!
iv[i].view.assigned())
Base-class for both propagators and branchers.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Home class for posting propagators
int size(void) const
Return the current size.
Range iterator for computing intersection (binary)
Range iterator for singleton range.
Value iterator from range iterator.
int val(void) const
Return current value.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Propagator(Home home)
Constructor for posting.
Range iterator for integer sets.
void dispose(Space &home)
Free memory used by this set.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
Gecode::Int::IdxViewArray< SView > IdxViewArray
ElementDisjoint(Space &home, ElementDisjoint &p)
Constructor for cloning p.
static ExecStatus post(Home home, IdxViewArray &x, RView y)
Post propagator for .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual void reschedule(Space &home)
Schedule function.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Growing sets of integers.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
Range iterator for the greatest lower bound.
Range iterator for the least upper bound.
Range iterator for the unknown set.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar SetRelType r
SetExpr inter(const SetVarArgs &)
Intersection of set variables.
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
int ModEvent
Type for modification events.