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

Function p_int_CMP_reif

gecode/flatzinc/registry.cpp:133–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 p_int_CMP(s, IRT_LE, ce, ann);
132 }
133 void p_int_CMP_reif(FlatZincSpace& s, IntRelType irt, ReifyMode rm,
134 const ConExpr& ce, AST::Node* ann) {
135 if (rm == RM_EQV && ce[2]->isBool()) {
136 if (ce[2]->getBool()) {
137 p_int_CMP(s, irt, ce, ann);
138 } else {
139 p_int_CMP(s, neg(irt), ce, ann);
140 }
141 return;
142 }
143 if (ce[0]->isIntVar()) {
144 if (ce[1]->isIntVar()) {
145 rel(s, s.arg2IntVar(ce[0]), irt, s.arg2IntVar(ce[1]),
146 Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann));
147 } else {
148 rel(s, s.arg2IntVar(ce[0]), irt, ce[1]->getInt(),
149 Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann));
150 }
151 } else {
152 rel(s, s.arg2IntVar(ce[1]), swap(irt), ce[0]->getInt(),
153 Reify(s.arg2BoolVar(ce[2]), rm), s.ann2ipl(ann));
154 }
155 }
156
157 /* Comparisons */
158 void p_int_eq_reif(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {

Callers 12

p_int_eq_reifFunction · 0.85
p_int_ne_reifFunction · 0.85
p_int_ge_reifFunction · 0.85
p_int_gt_reifFunction · 0.85
p_int_le_reifFunction · 0.85
p_int_lt_reifFunction · 0.85
p_int_eq_impFunction · 0.85
p_int_ne_impFunction · 0.85
p_int_ge_impFunction · 0.85
p_int_gt_impFunction · 0.85
p_int_le_impFunction · 0.85
p_int_lt_impFunction · 0.85

Calls 11

p_int_CMPFunction · 0.85
ReifyClass · 0.85
isBoolMethod · 0.80
getBoolMethod · 0.80
isIntVarMethod · 0.80
arg2IntVarMethod · 0.80
arg2BoolVarMethod · 0.80
ann2iplMethod · 0.80
getIntMethod · 0.80
negFunction · 0.50
relFunction · 0.50

Tested by

no test coverage detected