| 52 | |
| 53 | template<class View0, class View1> |
| 54 | ExecStatus |
| 55 | Distinct<View0,View1>::post(Home home, View0 x, View1 y) { |
| 56 | if (same(x,y)) |
| 57 | return ES_FAILED; |
| 58 | if (x.assigned()) { |
| 59 | GlbRanges<View0> xr(x); |
| 60 | IntSet xs(xr); |
| 61 | ConstSetView cv(home, xs); |
| 62 | GECODE_ES_CHECK((DistinctDoit<View1>::post(home,y,cv))); |
| 63 | } |
| 64 | if (y.assigned()) { |
| 65 | GlbRanges<View1> yr(y); |
| 66 | IntSet ys(yr); |
| 67 | ConstSetView cv(home, ys); |
| 68 | GECODE_ES_CHECK((DistinctDoit<View0>::post(home,x,cv))); |
| 69 | } |
| 70 | (void) new (home) Distinct<View0,View1>(home,x,y); |
| 71 | return ES_OK; |
| 72 | } |
| 73 | |
| 74 | template<class View0, class View1> |
| 75 | Actor* |