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

Function rel

gecode/int/bool.cpp:39–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace Gecode {
38
39 void
40 rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1, IntPropLevel) {
41 using namespace Int;
42 GECODE_POST;
43 switch (irt) {
44 case IRT_EQ:
45 GECODE_ES_FAIL((Bool::Eq<BoolView,BoolView>
46 ::post(home,x0,x1)));
47 break;
48 case IRT_NQ:
49 {
50 NegBoolView n1(x1);
51 GECODE_ES_FAIL((Bool::Eq<BoolView,NegBoolView>
52 ::post(home,x0,n1)));
53 }
54 break;
55 case IRT_GQ:
56 GECODE_ES_FAIL(Bool::Lq<BoolView>::post(home,x1,x0));
57 break;
58 case IRT_LQ:
59 GECODE_ES_FAIL(Bool::Lq<BoolView>::post(home,x0,x1));
60 break;
61 case IRT_GR:
62 GECODE_ES_FAIL(Bool::Le<BoolView>::post(home,x1,x0));
63 break;
64 case IRT_LE:
65 GECODE_ES_FAIL(Bool::Le<BoolView>::post(home,x0,x1));
66 break;
67 default:
68 throw UnknownRelation("Int::rel");
69 }
70 }
71
72 void
73 rel(Home home, BoolVar x0, IntRelType irt, int n, IntPropLevel) {

Callers

nothing calls this directly

Calls 12

NegBoolViewClass · 0.85
viewarrayFunction · 0.70
BoolViewClass · 0.70
postFunction · 0.50
zeroMethod · 0.45
oneMethod · 0.45
failMethod · 0.45
modeMethod · 0.45
varMethod · 0.45
sizeMethod · 0.45
eqMethod · 0.45
uniqueMethod · 0.45

Tested by

no test coverage detected