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

Function p_int_minus

gecode/flatzinc/registry.cpp:441–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439 }
440
441 void p_int_minus(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
442 if (!ce[0]->isIntVar()) {
443 rel(s, ce[0]->getInt() - s.arg2IntVar(ce[1])
444 == s.arg2IntVar(ce[2]), s.ann2ipl(ann));
445 } else if (!ce[1]->isIntVar()) {
446 rel(s, s.arg2IntVar(ce[0]) - ce[1]->getInt()
447 == s.arg2IntVar(ce[2]), s.ann2ipl(ann));
448 } else if (!ce[2]->isIntVar()) {
449 rel(s, s.arg2IntVar(ce[0]) - s.arg2IntVar(ce[1])
450 == ce[2]->getInt(), s.ann2ipl(ann));
451 } else {
452 rel(s, s.arg2IntVar(ce[0]) - s.arg2IntVar(ce[1])
453 == s.arg2IntVar(ce[2]), s.ann2ipl(ann));
454 }
455 }
456
457 void p_int_times(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
458 IntVar x0 = s.arg2IntVar(ce[0]);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected