Is it possible to find the KNN for a node that is *IN* the KD-tree?
Posted
by Stephen
on Stack Overflow
See other posts from Stack Overflow
or by Stephen
Published on 2010-03-26T16:52:29Z
Indexed on
2010/03/26
16:53 UTC
Read the original article
Hit count: 592
Hi there,
Trying to create a KNN search using a KD-tree. I can form the KD-tree fine (or at least, I believe I can!). My problem is that I am searching to find the closest 2 neighbours to every point in a list of points.
So, is there a method to find the K nearest neighbours to a point using a KD tree even if the point is actually IN the tree, or do I need to construct a seperate KD tree for each point, leaving out the point that I wish to search for?
My implementation language is C++, but I am more looking for either an algorithm or general help, thanks!
Thanks, Stephen
© Stack Overflow or respective owner