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

Function p_count_reif

gecode/flatzinc/registry.cpp:952–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

950 }
951
952 void p_count_reif(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
953 IntVarArgs iv = s.arg2intvarargs(ce[0]);
954 IntVar x = s.arg2IntVar(ce[1]);
955 IntVar y = s.arg2IntVar(ce[2]);
956 BoolVar b = s.arg2BoolVar(ce[3]);
957 IntVar c(s,0,Int::Limits::max);
958 count(s,iv,x,IRT_EQ,c,s.ann2ipl(ann));
959 rel(s, b == (c==y));
960 }
961 void p_count_imp(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
962 IntVarArgs iv = s.arg2intvarargs(ce[0]);
963 IntVar x = s.arg2IntVar(ce[1]);

Callers

nothing calls this directly

Calls 6

arg2intvarargsMethod · 0.80
arg2IntVarMethod · 0.80
arg2BoolVarMethod · 0.80
ann2iplMethod · 0.80
countFunction · 0.50
relFunction · 0.50

Tested by

no test coverage detected