Post constraint on \a x
| 109 | } |
| 110 | /// Post constraint on \a x |
| 111 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 112 | Gecode::IntVarArgs y(8); |
| 113 | for (int i=x.size(); i--; ) |
| 114 | y[i]=y[4+i]=x[i]; |
| 115 | Gecode::count(home, y, 0, irt, 4); |
| 116 | } |
| 117 | }; |
| 118 | |
| 119 | /// %Test number of equal integers equal to integer variable |