| 43 | namespace Gecode { |
| 44 | |
| 45 | void |
| 46 | distinct(Home home, const IntVarArgs& x, IntPropLevel ipl) { |
| 47 | using namespace Int; |
| 48 | if (same(x)) |
| 49 | throw ArgumentSame("Int::distinct"); |
| 50 | GECODE_POST; |
| 51 | ViewArray<IntView> xv(home,x); |
| 52 | switch (vbd(ipl)) { |
| 53 | case IPL_BND: |
| 54 | GECODE_ES_FAIL(Distinct::Bnd<IntView>::post(home,xv)); |
| 55 | break; |
| 56 | case IPL_DOM: |
| 57 | GECODE_ES_FAIL(Distinct::Dom<IntView>::post(home,xv)); |
| 58 | break; |
| 59 | default: |
| 60 | GECODE_ES_FAIL(Distinct::Val<IntView>::post(home,xv)); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void |
| 65 | distinct(Home home, const IntArgs& c, const IntVarArgs& x, |
no test coverage detected