Post constraint on \a x
| 76 | } |
| 77 | /// Post constraint on \a x |
| 78 | virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) { |
| 79 | switch (irt) { |
| 80 | case Gecode::IRT_EQ: |
| 81 | Gecode::exactly(home,x,0,2); break; |
| 82 | case Gecode::IRT_LQ: |
| 83 | Gecode::atmost(home,x,0,2); break; |
| 84 | case Gecode::IRT_GQ: |
| 85 | Gecode::atleast(home,x,0,2); break; |
| 86 | default: GECODE_NEVER; |
| 87 | } |
| 88 | } |
| 89 | }; |
| 90 | |
| 91 | /// %Test number of equal integers equal to integer variable |