Post circuit constraint on \a x
| 76 | } |
| 77 | /// Post circuit constraint on \a x |
| 78 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 79 | if (offset > 0) { |
| 80 | Gecode::IntVarArgs xx(x.size()); |
| 81 | for (int i=x.size(); i--;) |
| 82 | xx[i] = Gecode::expr(home, x[i]+offset); |
| 83 | Gecode::circuit(home, offset, xx, ipl); |
| 84 | } else { |
| 85 | Gecode::circuit(home, x, ipl); |
| 86 | } |
| 87 | } |
| 88 | }; |
| 89 | |
| 90 | /// Simple test for Hamiltonian path constraint |