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

Method cmp

contribs/qecode/WorkComparators.hh:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 this->deepestFirst = deepestFirst;
40 }
41 virtual bool cmp(QWork a,QWork b) {
42 bool q1 = (problem->qt_of_var(a.root().size()) != existsFirst);
43 bool q2 = (problem->qt_of_var(b.root().size()) != existsFirst);
44 if (q1 && !q2) return true;
45 if (!q1 && q2) return false;
46 int d1 = a.root().size();
47 int d2 = b.root().size();
48 if ( (d1 < d2) != deepestFirst) return true;
49 return false;
50 }
51};
52
53class DepthComparator : public WorkComparator {

Callers

nothing calls this directly

Calls 2

qt_of_varMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected