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

Method intersectI

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

Source from the content-addressed store, hash-verified

209
210 template<class I>
211 inline ModEvent
212 SetVarImp::intersectI(Space& home, I& iterator) {
213 if (assigned()) {
214 BndSetRanges lbi(glb);
215 Iter::Ranges::Diff<BndSetRanges,I> probe(lbi,iterator);
216 if (probe())
217 return fail(home);
218 return ME_SET_NONE;
219 }
220 if (!iterator()) {
221 if (cardMin() > 0)
222 return fail(home);
223 lub.card(0);
224 SetDelta d(1, 0, lub.min(), lub.max());
225 lub.excludeAll(home);
226 return notify(home, ME_SET_VAL, d);
227 }
228 int mi=iterator.min();
229 int ma=iterator.max();
230 ++iterator;
231 if (iterator())
232 return intersectI_full(home, mi, ma, iterator);
233 else
234 return intersect(home, mi, ma);
235 }
236
237 template<class I>
238 ModEvent

Callers 1

intersectI_fullMethod · 0.45

Calls 6

assignedFunction · 0.85
excludeAllMethod · 0.80
intersectFunction · 0.50
cardMethod · 0.45
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected