| 116 | |
| 117 | template<class V0, class V1, class V2> |
| 118 | ExecStatus |
| 119 | IteBnd<V0,V1,V2>::propagate(Space& home, const ModEventDelta&) { |
| 120 | if (b.one()) |
| 121 | GECODE_REWRITE(*this,(Rel::EqBnd<V2,V0>::post(home(*this),x2,x0))); |
| 122 | if (b.zero()) |
| 123 | GECODE_REWRITE(*this,(Rel::EqBnd<V2,V1>::post(home(*this),x2,x1))); |
| 124 | |
| 125 | GECODE_ME_CHECK(x2.lq(home,std::max(x0.max(),x1.max()))); |
| 126 | GECODE_ME_CHECK(x2.gq(home,std::min(x0.min(),x1.min()))); |
| 127 | |
| 128 | RelTest eq20 = rtest_eq_bnd(x2,x0); |
| 129 | RelTest eq21 = rtest_eq_bnd(x2,x1); |
| 130 | |
| 131 | if ((eq20 == RT_FALSE) && (eq21 == RT_FALSE)) |
| 132 | return ES_FAILED; |
| 133 | |
| 134 | if (eq20 == RT_FALSE) { |
| 135 | GECODE_ME_CHECK(b.zero_none(home)); |
| 136 | if (eq21 == RT_TRUE) |
| 137 | return home.ES_SUBSUMED(*this); |
| 138 | else |
| 139 | GECODE_REWRITE(*this,(Rel::EqBnd<V2,V1>::post(home(*this),x2,x1))); |
| 140 | } |
| 141 | |
| 142 | if (eq21 == RT_FALSE) { |
| 143 | GECODE_ME_CHECK(b.one_none(home)); |
| 144 | if (eq20 == RT_TRUE) |
| 145 | return home.ES_SUBSUMED(*this); |
| 146 | else |
| 147 | GECODE_REWRITE(*this,(Rel::EqBnd<V2,V0>::post(home(*this),x2,x0))); |
| 148 | } |
| 149 | |
| 150 | if ((eq20 == RT_TRUE) && (eq21 == RT_TRUE)) |
| 151 | return home.ES_SUBSUMED(*this); |
| 152 | |
| 153 | return ES_FIX; |
| 154 | } |
| 155 | |
| 156 | |
| 157 |
nothing calls this directly
no test coverage detected