| 649 | } |
| 650 | |
| 651 | int |
| 652 | BoxList::simplify (bool best) |
| 653 | { |
| 654 | std::ranges::sort(m_lbox, [](const Box& l, const Box& r) { |
| 655 | return l.smallEnd() < r.smallEnd(); }); |
| 656 | |
| 657 | // |
| 658 | // If we're not looking for the "best" we can do in one pass, we |
| 659 | // limit how far afield we look for abutting boxes. This greatly |
| 660 | // speeds up this routine for large numbers of boxes. It does not |
| 661 | // do quite as good a job though as full brute force. |
| 662 | // |
| 663 | int depth = best ? static_cast<int>(size()) : 100; |
| 664 | return simplify_doit(depth); |
| 665 | } |
| 666 | |
| 667 | int |
| 668 | BoxList::ordered_simplify () |
no test coverage detected