| 78 | using ClusterT = std::vector<NamedPoint const *>; |
| 79 | |
| 80 | void Sort(std::vector<ClusterT> & data) |
| 81 | { |
| 82 | for (auto & d : data) |
| 83 | std::sort(std::begin(d), std::end(d), [](NamedPoint const * l, NamedPoint const * r) { return l->m_id < r->m_id; }); |
| 84 | std::sort(std::begin(data), std::end(data), [](ClusterT const & l, ClusterT const & r) |
| 85 | { |
| 86 | TEST(!l.empty(), ()); |
| 87 | TEST(!r.empty(), ()); |
| 88 | return l.front()->m_id < r.front()->m_id; |
| 89 | }); |
| 90 | } |
| 91 | |
| 92 | void Test(std::vector<NamedPoint> const & input, std::vector<ClusterT> & expected) |
| 93 | { |