Post constraint on \a x
| 125 | } |
| 126 | /// Post constraint on \a x |
| 127 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 128 | int n=x.size() / 2; |
| 129 | Gecode::IntVarArgs s(n); |
| 130 | Gecode::BoolVarArgs m(n); |
| 131 | for (int i=0; i<n; i++) { |
| 132 | s[i]=x[i]; |
| 133 | m[i]=Gecode::expr(home, (x[n+i] > l)); |
| 134 | } |
| 135 | Gecode::unary(home, s, p, m, ipl); |
| 136 | } |
| 137 | }; |
| 138 | |
| 139 | /// %Test for unary constraint |