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

Method intersect

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

Source from the content-addressed store, hash-verified

178 }
179
180 forceinline ModEvent
181 SetVarImp::intersect(Space& home,int i, int j) {
182 BndSetRanges lb(glb);
183 Iter::Ranges::Singleton s(i,j);
184 Iter::Ranges::Diff<BndSetRanges, Iter::Ranges::Singleton> probe(lb, s);
185 if (probe())
186 return fail(home);
187 if (assigned())
188 return ME_SET_NONE;
189 int oldMin = lub.min();
190 int oldMax = lub.max();
191 if (lub.intersect(home, i, j)) {
192 SetDelta d;
193 if (i == oldMin) {
194 d._lubMin = lub.max()+1;
195 d._lubMax = oldMax;
196 } else if (j == oldMax) {
197 d._lubMin = oldMin;
198 d._lubMax = lub.min()-1;
199 }
200 return processLubChange(home, d);
201 }
202 return ME_SET_NONE;
203 }
204
205 forceinline ModEvent
206 SetVarImp::intersect(Space& home,int i) {

Callers

nothing calls this directly

Calls 4

assignedFunction · 0.85
intersectFunction · 0.50
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected