| 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 |