190 // |
190 // |
191 bool RingFinder::Solution::isSuperiorTo (const Solution* other) const |
191 bool RingFinder::Solution::isSuperiorTo (const Solution* other) const |
192 { |
192 { |
193 // If one solution has less components than the other one, it is definitely |
193 // If one solution has less components than the other one, it is definitely |
194 // better. |
194 // better. |
195 if (length(getComponents()) != length(other->getComponents())) |
195 if (countof(getComponents()) != countof(other->getComponents())) |
196 return length(getComponents()) < length(other->getComponents()); |
196 return countof(getComponents()) < countof(other->getComponents()); |
197 |
197 |
198 // Calculate the maximum ring number. Since the solutions have equal |
198 // Calculate the maximum ring number. Since the solutions have equal |
199 // ring counts, the solutions with lesser maximum rings should result |
199 // ring counts, the solutions with lesser maximum rings should result |
200 // in cleaner code and less new primitives, right? |
200 // in cleaner code and less new primitives, right? |
201 int maxA = 0, |
201 int maxA = 0, |