MCPcopy Create free account
hub / github.com/Gecode/gecode / eq_full

Method eq_full

gecode/int/var-imp/int.cpp:154–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 ModEvent
155 IntVarImp::eq_full(Space& home, int m) {
156 dom.min(m); dom.max(m);
157 if (!range()) {
158 bool failed = false;
159 RangeList* p = nullptr;
160 RangeList* c = fst();
161 while (m > c->max()) {
162 RangeList* n=c->next(p); c->fix(n); p=c; c=n;
163 }
164 if (m < c->min())
165 failed = true;
166 while (c != nullptr) {
167 RangeList* n=c->next(p); c->fix(n); p=c; c=n;
168 }
169 assert(p == lst());
170 fst()->dispose(home,p);
171 fst(nullptr); holes = 0;
172 if (failed)
173 return fail(home);
174 }
175 IntDelta d;
176 return notify(home,ME_INT_VAL,d);
177 }
178
179 ModEvent
180 IntVarImp::nq_full(Space& home, int m) {

Callers

nothing calls this directly

Calls 6

rangeFunction · 0.85
minMethod · 0.45
maxMethod · 0.45
nextMethod · 0.45
fixMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected