Post constraint on \a x
| 212 | } |
| 213 | /// Post constraint on \a x |
| 214 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 215 | Gecode::IntVarArgs y(4); |
| 216 | for (int i=0; i<4; i++) |
| 217 | y[i]=x[i]; |
| 218 | switch (irt) { |
| 219 | case Gecode::IRT_EQ: |
| 220 | Gecode::exactly(home,y,ints,2); break; |
| 221 | case Gecode::IRT_LQ: |
| 222 | Gecode::atmost(home,y,ints,2); break; |
| 223 | case Gecode::IRT_GQ: |
| 224 | Gecode::atleast(home,y,ints,2); break; |
| 225 | default: GECODE_NEVER; |
| 226 | } |
| 227 | } |
| 228 | }; |
| 229 | |
| 230 | /// %Test number of several equal integers equal to integer variable |