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

Function p_global_cardinality_low_up_closed

gecode/flatzinc/registry.cpp:1098–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1096 }
1097
1098 void p_global_cardinality_low_up_closed(FlatZincSpace& s,
1099 const ConExpr& ce,
1100 AST::Node* ann) {
1101 IntVarArgs x = s.arg2intvarargs(ce[0]);
1102 IntArgs cover = s.arg2intargs(ce[1]);
1103
1104 IntArgs lbound = s.arg2intargs(ce[2]);
1105 IntArgs ubound = s.arg2intargs(ce[3]);
1106 IntSetArgs y(cover.size());
1107 for (int i=cover.size(); i--;)
1108 y[i] = IntSet(lbound[i],ubound[i]);
1109 unshare(s, x);
1110 IntPropLevel ipl = s.ann2ipl(ann);
1111 if (ipl==IPL_DEF)
1112 ipl=IPL_BND;
1113 count(s, x, y, cover, ipl);
1114 }
1115
1116 void p_minimum(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
1117 IntVarArgs iv = s.arg2intvarargs(ce[1]);

Callers

nothing calls this directly

Calls 7

IntSetClass · 0.85
unshareFunction · 0.85
arg2intvarargsMethod · 0.80
arg2intargsMethod · 0.80
ann2iplMethod · 0.80
countFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected