Post constraint on \a x
| 99 | } |
| 100 | /// Post constraint on \a x |
| 101 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 102 | using namespace Gecode; |
| 103 | int n=x.size() >> 1; |
| 104 | BoolVarArgs y(n); BoolVarArgs z(n); |
| 105 | for (int i=0; i<n; i++) { |
| 106 | y[i]=channel(home,x[i]); z[i]=channel(home,x[n+i]); |
| 107 | } |
| 108 | lex(home, y, irt, z); |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | /// Help class to create and register tests |