I have a 3D point cloud, given a starting point, I want to build a route that visits all points exactly once by the following steps:
1, find the nearest point of the current point in unvisited points.
2, visit the nearest point and regard it as the current point
3, repeat 1-2 until all the points are visited.
Now I employ nanoflann to build kd-tree to find the nearest points and delete visited points. However, the delete function of nanoflann is a lazy one in which the visited points are not really removed, leading to bad performance. Is there a better way to achieve such a route? or is there an ANN algorithm supporting deletion?