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

Function p_bool2int

gecode/flatzinc/registry.cpp:834–841  ·  view source on GitHub ↗

coercion constraints */

Source from the content-addressed store, hash-verified

832
833 /* coercion constraints */
834 void p_bool2int(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
835 BoolVar x0 = s.arg2BoolVar(ce[0]);
836 IntVar x1 = s.arg2IntVar(ce[1]);
837 if (ce[0]->isBoolVar() && ce[1]->isIntVar()) {
838 s.aliasBool2Int(ce[1]->getIntVar(), ce[0]->getBoolVar());
839 }
840 channel(s, x0, x1, s.ann2ipl(ann));
841 }
842
843 void p_int_in(FlatZincSpace& s, const ConExpr& ce, AST::Node *) {
844 IntSet d = s.arg2intset(ce[1]);

Callers

nothing calls this directly

Calls 9

arg2BoolVarMethod · 0.80
arg2IntVarMethod · 0.80
isBoolVarMethod · 0.80
isIntVarMethod · 0.80
aliasBool2IntMethod · 0.80
getIntVarMethod · 0.80
getBoolVarMethod · 0.80
ann2iplMethod · 0.80
channelFunction · 0.50

Tested by

no test coverage detected