Post constraint on \a x
| 1054 | } |
| 1055 | /// Post constraint on \a x |
| 1056 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 1057 | int n=x.size()-1; |
| 1058 | Gecode::BoolVarArgs m(2*n); |
| 1059 | for (int i=0; i<n; i++) |
| 1060 | m[2*i+0]=m[2*i+1]=channel(home,x[i]); |
| 1061 | Gecode::argmin(home, m, x[n], tiebreak); |
| 1062 | } |
| 1063 | }; |
| 1064 | |
| 1065 | /// Help class to create and register tests |