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

Method processGlbChange

gecode/set/var-imp/set.cpp:89–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 ModEvent
90 SetVarImp::processGlbChange(Space& home, SetDelta& d) {
91 ModEvent me = ME_SET_GLB;
92 if (cardMin() < glb.size()) {
93 glb.card(glb.size());
94 if (cardMin() > cardMax()) {
95 glb.become(home, lub);
96 glb.card(glb.size());
97 lub.card(glb.size());
98 return fail(home);
99 }
100 me = ME_SET_CGLB;
101 }
102 if (cardMin() == glb.size() && cardMin() == cardMax()) {
103 lub.become(home, glb);
104 me = ME_SET_VAL;
105 assert(d.lubMin() == 1);
106 assert(d.lubMax() == 0);
107 }
108 return notify(home, me, d);
109 }
110
111 /*
112 * Copying variables

Callers

nothing calls this directly

Calls 5

becomeMethod · 0.80
sizeMethod · 0.45
cardMethod · 0.45
lubMinMethod · 0.45
lubMaxMethod · 0.45

Tested by

no test coverage detected