Post constraint on \a x
| 141 | } |
| 142 | /// Post constraint on \a x |
| 143 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 144 | Gecode::IntVarArgs y(3); |
| 145 | for (int i=0; i<3; i++) |
| 146 | y[i]=x[i]; |
| 147 | switch (irt) { |
| 148 | case Gecode::IRT_EQ: |
| 149 | Gecode::exactly(home,y,x[3],x[4]); break; |
| 150 | case Gecode::IRT_LQ: |
| 151 | Gecode::atmost(home,y,x[3],x[4]); break; |
| 152 | case Gecode::IRT_GQ: |
| 153 | Gecode::atleast(home,y,x[3],x[4]); break; |
| 154 | default: GECODE_NEVER; |
| 155 | } |
| 156 | } |
| 157 | }; |
| 158 | |
| 159 | /// %Test number of equal variables equal to integer |