| 273 | */ |
| 274 | template<class I> |
| 275 | forceinline ModEvent |
| 276 | BoolVarImp::narrow_r(Space& home, I& i, bool) { |
| 277 | // Is new domain empty? |
| 278 | if (!i()) |
| 279 | return fail(home); |
| 280 | assert((i.min() == 0) || (i.min() == 1)); |
| 281 | assert((i.max() == 0) || (i.max() == 1)); |
| 282 | if (i.max() == 0) { |
| 283 | assert(!one()); |
| 284 | // Assign domain to be zero (domain cannot be one) |
| 285 | return zero(home); |
| 286 | } |
| 287 | if (i.min() == 1) { |
| 288 | // Assign domain to be one (domain cannot be zero) |
| 289 | assert(!zero()); |
| 290 | return one(home); |
| 291 | } |
| 292 | assert(none()); |
| 293 | return ME_INT_NONE; |
| 294 | } |
| 295 | template<class I> |
| 296 | forceinline ModEvent |
| 297 | BoolVarImp::inter_r(Space& home, I& i, bool) { |