src/ringFinder.cpp

changeset 1065
c8ecddbd99e9
parent 1063
1f15c52c11f6
child 1072
9ce9496427f2
equal deleted inserted replaced
1064:4c7a353cf583 1065:c8ecddbd99e9
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,

mercurial