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

Method excludeI_full

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

Source from the content-addressed store, hash-verified

383
384 template<class I>
385 ModEvent
386 SetVarImp::excludeI_full(Space& home, int mi, int ma, I& iterator) {
387 Iter::Ranges::SingletonAppend<I> si(mi,ma,iterator);
388 if (lub.excludeI(home, si)) {
389 BndSetRanges ub(lub);
390 BndSetRanges lb(glb);
391 if (!Iter::Ranges::subset(lb,ub)) {
392 glb.become(home, lub);
393 glb.card(glb.size());
394 lub.card(glb.size());
395 return fail(home);
396 }
397 ModEvent me = ME_SET_LUB;
398 if (cardMax() > lub.size()) {
399 lub.card(lub.size());
400 if (cardMin() > cardMax()) {
401 glb.become(home, lub);
402 glb.card(glb.size());
403 lub.card(glb.size());
404 return fail(home);
405 }
406 me = ME_SET_CLUB;
407 }
408 if (cardMax() == lub.size() && cardMin() == cardMax()) {
409 glb.become(home, lub);
410 me = ME_SET_VAL;
411 }
412 SetDelta d;
413 return notify(home, me, d);
414 }
415 return ME_SET_NONE;
416 }
417
418 /*
419 * Copying a variable

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected