Majority voting in find_nearest()

Sylvain Bougerel sylvain.bougerel.devel at gmail.com
Thu Oct 16 08:27:21 UTC 2008


Hi Willi,

I bumped into the same requirement in the past. My personal desire it
to implement an iterator on the nearest neighbor that goes outward.
With this, you could call i++ until you find the point that correspond
to your requirements. I've just started working on this recently, and
you might have to wait a bit for a similar feature to come in.


At the moment, regrettably, I cannot think of any solution that does
not involve modifying the library itself.

On Wed, Oct 15, 2008 at 7:06 PM, Willi Richert <w.richert at gmx.net> wrote:
> Hi,
>
> in some situations the same point is inserted with different labels. In this
> case find_nearest returns an arbitrary point of these euqally nearest points
> to the query point.
>
> However, it would be nice if one could get either all the points that are
> nearest and identical or to have a method that returns the label of the
> majority of the (identical) nearest points.
>
> Would that be feasible with the current libkdtree++ implementation?
>
> Regards,
>
> wr
>
> _______________________________________________
> libkdtree-devel mailing list
> libkdtree-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libkdtree-devel
>
>



More information about the libkdtree-devel mailing list