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

Method minus_r

gecode/int/var-imp/bool.hpp:313–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311 }
312 template<class I>
313 forceinline ModEvent
314 BoolVarImp::minus_r(Space& home, I& i, bool) {
315 // Skip all ranges that are too small
316 while (i() && (i.max() < 0))
317 ++i;
318 // Is new domain empty?
319 if (!i() || (i.min() > 1))
320 return ME_INT_NONE;
321 assert(i.min() <= 1);
322 if (i.min() == 1)
323 return zero(home);
324 if (i.max() == 0)
325 return one(home);
326 assert((i.min() <= 0) && (i.max() >= 1));
327 return fail(home);
328 }
329
330 template<class I>
331 forceinline ModEvent

Callers

nothing calls this directly

Calls 4

iFunction · 0.50
oneFunction · 0.50
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected