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

Function p_nvalue

gecode/flatzinc/registry.cpp:1616–1624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614 }
1615
1616 void p_nvalue(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
1617 IntVarArgs x = s.arg2intvarargs(ce[1]);
1618 if (ce[0]->isIntVar()) {
1619 IntVar y = s.arg2IntVar(ce[0]);
1620 nvalues(s,x,IRT_EQ,y,s.ann2ipl(ann));
1621 } else {
1622 nvalues(s,x,IRT_EQ,ce[0]->getInt(),s.ann2ipl(ann));
1623 }
1624 }
1625
1626 void p_among(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
1627 IntVarArgs x = s.arg2intvarargs(ce[1]);

Callers

nothing calls this directly

Calls 6

nvaluesFunction · 0.85
arg2intvarargsMethod · 0.80
isIntVarMethod · 0.80
arg2IntVarMethod · 0.80
ann2iplMethod · 0.80
getIntMethod · 0.80

Tested by

no test coverage detected