MCPcopy Create free account
hub / github.com/Gecode/gecode / distinct

Function distinct

gecode/int/distinct.cpp:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace 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,

Callers 15

QueensMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85
setupMethod · 0.85

Calls 15

OffsetViewClass · 0.70
minFunction · 0.70
maxFunction · 0.70
IntVarClass · 0.70
sameFunction · 0.50
postFunction · 0.50
checkFunction · 0.50
sizeMethod · 0.45
minMethod · 0.45
maxMethod · 0.45
zeroMethod · 0.45
oneMethod · 0.45

Tested by

no test coverage detected