Post constraint on \a xy
| 197 | } |
| 198 | /// Post constraint on \a xy |
| 199 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& xy) { |
| 200 | using namespace Gecode; |
| 201 | int n = xy.size() - 1; |
| 202 | BoolVarArgs x(n); |
| 203 | for (int i=n; i--; ) |
| 204 | x[i] = channel(home, xy[i]); |
| 205 | nvalues(home, x, irt, xy[n]); |
| 206 | } |
| 207 | }; |
| 208 | |
| 209 | /// Help class to create and register tests |