| 118 | |
| 119 | template<class View> |
| 120 | ExecStatus |
| 121 | ChannelInt<View>::propagate(Space& home, const ModEventDelta&) { |
| 122 | int assigned = 0; |
| 123 | for (int v=xs.size(); v--;) { |
| 124 | if (xs[v].assigned()) { |
| 125 | assigned++; |
| 126 | if (xs[v].modified()) |
| 127 | GECODE_ME_CHECK(ys[xs[v].val()].include(home,v)); |
| 128 | } |
| 129 | if (xs[v].modified()) { |
| 130 | Gecode::Int::ViewDiffRanges<Gecode::Int::IntView> d(xs[v]); |
| 131 | Iter::Ranges::ToValues<Gecode::Int::ViewDiffRanges< |
| 132 | Gecode::Int::IntView> > dv(d); |
| 133 | for (; dv(); ++dv) |
| 134 | GECODE_ME_CHECK(ys[dv.val()].exclude(home, v)); |
| 135 | xs[v].cache(home); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | for (int i=ys.size(); i--;) { |
| 140 | if (ys[i].glbModified()) { |
| 141 | GlbDiffRanges<View> yilb(ys[i]); |
| 142 | Iter::Ranges::ToValues<GlbDiffRanges<View> > dv(yilb); |
| 143 | for (;dv();++dv) |
| 144 | GECODE_ME_CHECK(xs[dv.val()].eq(home,i)); |
| 145 | ys[i].cacheGlb(home); |
| 146 | } |
| 147 | if (ys[i].lubModified()) { |
| 148 | LubDiffRanges<View> yiub(ys[i]); |
| 149 | Iter::Ranges::ToValues<LubDiffRanges<View> > dv(yiub); |
| 150 | for (;dv();++dv) |
| 151 | GECODE_ME_CHECK(xs[dv.val()].nq(home,i)); |
| 152 | ys[i].cacheLub(home); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | return (assigned==xs.size()) ? home.ES_SUBSUMED(*this) : ES_NOFIX; |
| 157 | } |
| 158 | |
| 159 | }}} |
| 160 |
nothing calls this directly
no test coverage detected