MCPcopy Create free account
hub / github.com/PDAL/PDAL / basic_sort

Method basic_sort

pdal/PointView.cpp:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84template<typename Sorter>
85void PointView::basic_sort(Sorter sort, Compare comp)
86{
87 std::vector<PointId> order(size());
88
89 std::iota(order.begin(), order.end(), 0);
90
91 sort(order.begin(), order.end(), comp);
92
93 for (PointId& o : order)
94 o = m_index[o];
95 for (size_t i = 0; i < m_index.size(); ++i)
96 m_index[i] = order[i];
97}
98
99void PointView::sort(Dimension::Id dim)
100{

Callers

nothing calls this directly

Calls 4

sizeFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected