Post constraint on \a x
| 175 | } |
| 176 | /// Post constraint on \a x |
| 177 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 178 | Gecode::IntVarArgs y(3); |
| 179 | for (int i=0; i<3; i++) |
| 180 | y[i]=x[i]; |
| 181 | switch (irt) { |
| 182 | case Gecode::IRT_EQ: |
| 183 | Gecode::exactly(home,y,x[3],2); break; |
| 184 | case Gecode::IRT_LQ: |
| 185 | Gecode::atmost(home,y,x[3],2); break; |
| 186 | case Gecode::IRT_GQ: |
| 187 | Gecode::atleast(home,y,x[3],2); break; |
| 188 | default: GECODE_NEVER; |
| 189 | } |
| 190 | } |
| 191 | }; |
| 192 | |
| 193 | Gecode::IntArgs ints({1,0,3,2}); |