%Test whether \a x is solution
| 322 | : SetTest(t,1,ds_13,false,true), i0(-3,-3), i1(-1,1), i2(0,2) {} |
| 323 | /// %Test whether \a x is solution |
| 324 | virtual bool solution(const SetAssignment& x) const { |
| 325 | if (x.intval() < 0 || x.intval() > 2) |
| 326 | return false; |
| 327 | CountableSetRanges xr(x.lub, x[0]); |
| 328 | IntSet iss[] = {i0, i1, i2}; |
| 329 | IntSetRanges isr(iss[x.intval()]); |
| 330 | return Iter::Ranges::equal(xr, isr); |
| 331 | } |
| 332 | /// Post constraint on \a x |
| 333 | virtual void post(Space& home, SetVarArray& x, IntVarArray& y) { |
| 334 | IntSetArgs xs(3); |