Post constraint on \a x
| 161 | } |
| 162 | /// Post constraint on \a x |
| 163 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 164 | Gecode::IntVarArgs y(4); |
| 165 | for (int i=0; i<4; i++) |
| 166 | y[i]=x[i]; |
| 167 | Gecode::IntSet s(-1,1); |
| 168 | Gecode::count(home, y, s, irt, x[4]); |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | Gecode::IntArgs ints({1,0,3,2}); |