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

Function p_set_card

gecode/flatzinc/registry.cpp:1923–1930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1921 p_set_rel(s, SRT_LE, ce);
1922 }
1923 void p_set_card(FlatZincSpace& s, const ConExpr& ce, AST::Node *) {
1924 if (!ce[1]->isIntVar()) {
1925 cardinality(s, s.arg2SetVar(ce[0]), ce[1]->getInt(),
1926 ce[1]->getInt());
1927 } else {
1928 cardinality(s, s.arg2SetVar(ce[0]), s.arg2IntVar(ce[1]));
1929 }
1930 }
1931 void p_set_in(FlatZincSpace& s, const ConExpr& ce, AST::Node *) {
1932 if (!ce[1]->isSetVar()) {
1933 IntSet d = s.arg2intset(ce[1]);

Callers

nothing calls this directly

Calls 5

isIntVarMethod · 0.80
arg2SetVarMethod · 0.80
getIntMethod · 0.80
arg2IntVarMethod · 0.80
cardinalityFunction · 0.50

Tested by

no test coverage detected