How to implement nearest neighbor search using KDTrees?
问题 So, I'm implementing a KD-Tree to do a nearest neighbor search. I've got the building the tree part working, but I don't think I understand the search part completely. About traversing the tree to search for the neighbor, the Wikipedia article says the following: Starting with the root node, the algorithm moves down the tree recursively, in the same way that it would if the search point were being inserted (i.e. it goes right or left depending on whether the point is greater or less than the