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

Function rel

gecode/int/rel.cpp:41–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace Gecode {
40
41 void
42 rel(Home home, IntVar x0, IntRelType irt, int n, IntPropLevel) {
43 using namespace Int;
44 Limits::check(n,"Int::rel");
45 GECODE_POST;
46 IntView x(x0);
47 switch (irt) {
48 case IRT_EQ: GECODE_ME_FAIL(x.eq(home,n)); break;
49 case IRT_NQ: GECODE_ME_FAIL(x.nq(home,n)); break;
50 case IRT_LQ: GECODE_ME_FAIL(x.lq(home,n)); break;
51 case IRT_LE: GECODE_ME_FAIL(x.le(home,n)); break;
52 case IRT_GQ: GECODE_ME_FAIL(x.gq(home,n)); break;
53 case IRT_GR: GECODE_ME_FAIL(x.gr(home,n)); break;
54 default: throw UnknownRelation("Int::rel");
55 }
56 }
57
58 void
59 rel(Home home, const IntVarArgs& x, IntRelType irt, int n, IntPropLevel) {

Callers 2

unifyFunction · 0.70
postFunction · 0.50

Calls 14

viewarrayFunction · 0.70
IntViewClass · 0.70
checkFunction · 0.50
postFunction · 0.50
eqMethod · 0.45
nqMethod · 0.45
lqMethod · 0.45
leMethod · 0.45
gqMethod · 0.45
grMethod · 0.45
sizeMethod · 0.45
modeMethod · 0.45

Tested by

no test coverage detected