Post constraint on \a x
| 247 | } |
| 248 | /// Post constraint on \a x |
| 249 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 250 | Gecode::IntVarArgs y(4); |
| 251 | for (int i=0; i<4; i++) |
| 252 | y[i]=x[i]; |
| 253 | switch (irt) { |
| 254 | case Gecode::IRT_EQ: |
| 255 | Gecode::exactly(home,y,ints,x[4]); break; |
| 256 | case Gecode::IRT_LQ: |
| 257 | Gecode::atmost(home,y,ints,x[4]); break; |
| 258 | case Gecode::IRT_GQ: |
| 259 | Gecode::atleast(home,y,ints,x[4]); break; |
| 260 | default: GECODE_NEVER; |
| 261 | } |
| 262 | } |
| 263 | }; |
| 264 | |
| 265 | /// Help class to create and register tests |