%Test whether \a x is solution
| 294 | : SetTest(t,4,ds_12,false,true) {} |
| 295 | /// %Test whether \a x is solution |
| 296 | virtual bool solution(const SetAssignment& x) const { |
| 297 | if (x.intval() < 0 || x.intval() > 2) |
| 298 | return false; |
| 299 | CountableSetRanges z(x.lub, x[3]); |
| 300 | CountableSetRanges y(x.lub, x[x.intval()]); |
| 301 | return Iter::Ranges::equal(y, z); |
| 302 | } |
| 303 | /// Post constraint on \a x |
| 304 | virtual void post(Space& home, SetVarArray& x, IntVarArray& y) { |
| 305 | SetVarArgs xs(x.size()-1); |