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

Function p_bool_lin_CMP_reif

gecode/flatzinc/registry.cpp:334–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332 linear(s, ia, iv, irt, ce[2]->getInt(), s.ann2ipl(ann));
333 }
334 void p_bool_lin_CMP_reif(FlatZincSpace& s, IntRelType irt, ReifyMode rm,
335 const ConExpr& ce, AST::Node* ann) {
336 if (rm == RM_EQV && ce[2]->isBool()) {
337 if (ce[2]->getBool()) {
338 p_bool_lin_CMP(s, irt, ce, ann);
339 } else {
340 p_bool_lin_CMP(s, neg(irt), ce, ann);
341 }
342 return;
343 }
344 IntArgs ia = s.arg2intargs(ce[0]);
345 BoolVarArgs iv = s.arg2boolvarargs(ce[1]);
346 if (ce[2]->isIntVar())
347 linear(s, ia, iv, irt, s.iv[ce[2]->getIntVar()],
348 Reify(s.arg2BoolVar(ce[3]), rm),
349 s.ann2ipl(ann));
350 else
351 linear(s, ia, iv, irt, ce[2]->getInt(),
352 Reify(s.arg2BoolVar(ce[3]), rm),
353 s.ann2ipl(ann));
354 }
355 void p_bool_lin_eq(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
356 p_bool_lin_CMP(s, IRT_EQ, ce, ann);
357 }

Callers 12

p_bool_lin_eq_reifFunction · 0.85
p_bool_lin_eq_impFunction · 0.85
p_bool_lin_ne_reifFunction · 0.85
p_bool_lin_ne_impFunction · 0.85
p_bool_lin_le_reifFunction · 0.85
p_bool_lin_le_impFunction · 0.85
p_bool_lin_lt_reifFunction · 0.85
p_bool_lin_lt_impFunction · 0.85
p_bool_lin_ge_reifFunction · 0.85
p_bool_lin_ge_impFunction · 0.85
p_bool_lin_gt_reifFunction · 0.85
p_bool_lin_gt_impFunction · 0.85

Calls 13

p_bool_lin_CMPFunction · 0.85
ReifyClass · 0.85
isBoolMethod · 0.80
getBoolMethod · 0.80
arg2intargsMethod · 0.80
arg2boolvarargsMethod · 0.80
isIntVarMethod · 0.80
getIntVarMethod · 0.80
arg2BoolVarMethod · 0.80
ann2iplMethod · 0.80
getIntMethod · 0.80
negFunction · 0.50

Tested by

no test coverage detected