| 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 | |
| 53 | class DepthComparator : public WorkComparator { |