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

Function p_distinctOffset

gecode/flatzinc/registry.cpp:84–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 void p_distinctOffset(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
85 IntVarArgs va = s.arg2intvarargs(ce[1]);
86 unshare(s, va);
87 AST::Array* offs = ce.args->a[0]->getArray();
88 IntArgs oa(offs->a.size());
89 for (int i=offs->a.size(); i--; ) {
90 oa[i] = offs->a[i]->getInt();
91 }
92 IntPropLevel ipl = s.ann2ipl(ann);
93 distinct(s, oa, va, ipl == IPL_DEF ? IPL_BND : ipl);
94 }
95
96 void p_all_equal(FlatZincSpace& s, const ConExpr& ce, AST::Node* ann) {
97 IntVarArgs va = s.arg2intvarargs(ce[0]);

Callers

nothing calls this directly

Calls 7

unshareFunction · 0.85
distinctFunction · 0.85
arg2intvarargsMethod · 0.80
getArrayMethod · 0.80
getIntMethod · 0.80
ann2iplMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected