Return an upper bound on ratio() very quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute than either .Ratio() or .QuickRatio().
()
| 510 | // This isn't defined beyond that it is an upper bound on .Ratio(), and |
| 511 | // is faster to compute than either .Ratio() or .QuickRatio(). |
| 512 | func (m *SequenceMatcher) RealQuickRatio() float64 { |
| 513 | la, lb := len(m.a), len(m.b) |
| 514 | return calculateRatio(min(la, lb), la+lb) |
| 515 | } |
| 516 | |
| 517 | // Convert range to the "ed" format |
| 518 | func formatRangeUnified(start, stop int) string { |