| 45 | } |
| 46 | |
| 47 | forceinline ExecStatus |
| 48 | OrderProp::post(Home home, IntView s0, int p0, IntView s1, int p1, |
| 49 | BoolView b) { |
| 50 | if (s0.max() + p0 <= s1.min()) { |
| 51 | GECODE_ME_CHECK(b.zero(home)); |
| 52 | } else if (s1.max() + p1 <= s0.min()) { |
| 53 | GECODE_ME_CHECK(b.one(home)); |
| 54 | } else if ((s1.min() + p1 > s0.max()) || b.zero()) { |
| 55 | GECODE_ME_CHECK(b.zero(home)); |
| 56 | return Rel::Lq<OffsetView,IntView>::post(home,OffsetView(s0,p0),s1); |
| 57 | } else if ((s0.min() + p0 > s1.max()) || b.one()) { |
| 58 | GECODE_ME_CHECK(b.one(home)); |
| 59 | return Rel::Lq<OffsetView,IntView>::post(home,OffsetView(s1,p1),s0); |
| 60 | } else { |
| 61 | (void) new (home) OrderProp(home,s0,p0,s1,p1,b); |
| 62 | } |
| 63 | return ES_OK; |
| 64 | } |
| 65 | |
| 66 | forceinline |
| 67 | OrderProp::OrderProp(Space& home, OrderProp& p) |