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

Method includeI_full

gecode/set/var-imp/set.hpp:312–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311 template<class I>
312 ModEvent
313 SetVarImp::includeI_full(Space& home, int mi, int ma, I& iterator) {
314 Iter::Ranges::SingletonAppend<I> si(mi,ma,iterator);
315 if (glb.includeI(home, si)) {
316 BndSetRanges ub(lub);
317 BndSetRanges lb(glb);
318 if (!Iter::Ranges::subset(lb,ub)) {
319 glb.become(home, lub);
320 glb.card(glb.size());
321 lub.card(glb.size());
322 return fail(home);
323 }
324 ModEvent me = ME_SET_GLB;
325 if (cardMin() < glb.size()) {
326 glb.card(glb.size());
327 if (cardMin() > cardMax()) {
328 glb.become(home, lub);
329 glb.card(glb.size());
330 lub.card(glb.size());
331 return fail(home);
332 }
333 me = ME_SET_CGLB;
334 }
335 if (cardMin() == glb.size() && cardMin() == cardMax()) {
336 lub.become(home, glb);
337 me = ME_SET_VAL;
338 }
339 SetDelta d;
340 return notify(home, me, d);
341 }
342 return ME_SET_NONE;
343 }
344
345 forceinline ModEvent
346 SetVarImp::exclude(Space& home, int i, int j) {

Callers

nothing calls this directly

Calls 5

becomeMethod · 0.80
subsetFunction · 0.50
includeIMethod · 0.45
cardMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected