forum.alglib.net

ALGLIB forum
It is currently Sun Nov 24, 2024 4:54 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: KDTree: is rearch result ordered?
PostPosted: Tue Feb 05, 2013 7:46 am 
Offline

Joined: Wed Oct 06, 2010 7:02 am
Posts: 7
Hello,

I'm using your KDTree for 2D points with Euclidean norm and do KDTreeQueryKNN() and then KDTreeQueryResultsTags()
Is the search result guaranteed to be ordered in meaning of nondecreasing distance to "search point"?

I need to "order" of points of more or less regular polyline and do it in quite naive way: I take the first point (it's specified) and find nearest one, then nearest one for the last found and so on. Your KDTree can not be modified (point can not be removed) and I have to store boolean array of already involved points. On each step I try to find K nearest points, then take FIRST unused (if all are used I increase the K number).

Is it possible to modify The tree for point remove support
or
to make it support some think like callback boolean function, returning should point be returned as search result or not (to pass the callback to search proc and to use Tag as callback parameter).

Thank you.


Top
 Profile  
 
 Post subject: Re: KDTree: is rearch result ordered?
PostPosted: Wed Feb 06, 2013 4:07 am 
Offline

Joined: Wed Oct 06, 2010 7:02 am
Posts: 7
I added callback funtion and it works fine for my case.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group