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

Method prune_idx

gecode/int/element/int.hpp:221–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220 template<class V0, class V1, class Idx, class Val>
221 void
222 Int<V0,V1,Idx,Val>::prune_idx(void) {
223 Idx p = 0;
224 Idx i = iv[p].idx_next;
225 ViewRanges<V0> v(x0);
226 while (v() && (i != 0)) {
227 assert(!iv[i].marked());
228 if (iv[i].idx < v.min()) {
229 iv[i].mark(); i=iv[i].idx_next; iv[p].idx_next=i;
230 } else if (iv[i].idx > v.max()) {
231 ++v;
232 } else {
233 p=i; i=iv[i].idx_next;
234 }
235 }
236 iv[p].idx_next = 0;
237 while (i != 0) {
238 iv[i].mark(); i=iv[i].idx_next;
239 }
240 }
241
242 template<class V0, class V1, class Idx, class Val>
243 void

Callers

nothing calls this directly

Calls 4

markedMethod · 0.45
minMethod · 0.45
markMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected