Determines permutation table for point array.
| 57 | |
| 58 | // Determines permutation table for point array. |
| 59 | void |
| 60 | NeighborhoodSearch::z_sort() |
| 61 | { |
| 62 | for (PointSet& d : m_point_sets) |
| 63 | { |
| 64 | d.m_sort_table.resize(d.n_points()); |
| 65 | std::iota(d.m_sort_table.begin(), d.m_sort_table.end(), 0); |
| 66 | |
| 67 | std::sort(d.m_sort_table.begin(), d.m_sort_table.end(), |
| 68 | [&](unsigned int a, unsigned int b) |
| 69 | { |
| 70 | return z_value(cell_index(d.point(a))) < z_value(cell_index(d.point(b))); |
| 71 | }); |
| 72 | } |
| 73 | m_initialized = false; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | // Build hash table and entry array from scratch. |