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

Function p_int_CMP

gecode/flatzinc/registry.cpp:101–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 void p_int_CMP(FlatZincSpace& s, IntRelType irt, const ConExpr& ce,
102 AST::Node* ann) {
103 if (ce[0]->isIntVar()) {
104 if (ce[1]->isIntVar()) {
105 rel(s, s.arg2IntVar(ce[0]), irt, s.arg2IntVar(ce[1]),
106 s.ann2ipl(ann));
107 } else {
108 rel(s, s.arg2IntVar(ce[0]), irt, ce[1]->getInt(), s.ann2ipl(ann));
109 }
110 } else {
111 rel(s, s.arg2IntVar(ce[1]), swap(irt), ce[0]->getInt(),
112 s.ann2ipl(ann));
113 }
114 }
115 void p_int_eq(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
116 p_int_CMP(s, IRT_EQ, ce, ann);
117 }

Callers 7

p_int_eqFunction · 0.85
p_int_neFunction · 0.85
p_int_geFunction · 0.85
p_int_gtFunction · 0.85
p_int_leFunction · 0.85
p_int_ltFunction · 0.85
p_int_CMP_reifFunction · 0.85

Calls 5

isIntVarMethod · 0.80
arg2IntVarMethod · 0.80
ann2iplMethod · 0.80
getIntMethod · 0.80
relFunction · 0.50

Tested by

no test coverage detected