Post constraint on \a xy
| 76 | } |
| 77 | /// Post constraint on \a xy |
| 78 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& xy) { |
| 79 | using namespace Gecode; |
| 80 | int n = xy.size() / 2; |
| 81 | IntVarArgs x(n), y(n); |
| 82 | for (int i=0; i<n; i++) { |
| 83 | x[i]=xy[2*i+0]; y[i]=xy[2*i+1]; |
| 84 | } |
| 85 | nooverlap(home, x, w, y, h); |
| 86 | } |
| 87 | }; |
| 88 | /// %Test for no-overlap with optional rectangles |
| 89 | class IntOpt2 : public Test { |