Re: [Spatial] Combined orthogonal range and kNN queries
Library of generic, k-d tree multi-dimensional containers
Brought to you by:
bouhdevel
From: Sylvain B. <syl...@gm...> - 2018-08-22 04:43:43
|
Hi Felix, Sorry I saw your question way too late. You will not gain much by combining both, I am afraid. There are several reasons for this: - kNN queries in k-D tree reduce the range space very rapidly, even in very dense sets. - kNN are the most processing intensive, and much of the computation will be dominated by them anyway There maybe cases where that might seem useful, but usually, running the orthogonal range search first and then all distance calculations on the result set is just as fast. Such situation arise when you are trying to find the closest neighbor when most points are on a sphere and the target is next to its center. In this case of situation, an orthogonal range search is much faster and more appropriate if you know in which sector of the sphere you must look. But again, you might as well just run all the distance calculations in a loop, since the kNN search will not give any benefits. I hope it was useful, Sylvain On Wed, Aug 15, 2018 at 8:52 PM Felix Laufer <la...@in...> wrote: > Hi there, > > is it possible to (efficiently) combine orthogonal range and kNN queries? > F.i. I'd like to retrieve only those k nearest neighbors within a > specific n-dimensional box. > Could you point me to some code examples? > > Thanks, > Felix > > -- > M.Sc. Felix Laufer > > Office: Building 48, Room 458 > Email: la...@cs... > > Department of Computer Science > AG wearHEALTH (http://www.wearhealth.org) > TU Kaiserslautern > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Spatial-main mailing list > Spa...@li... > https://lists.sourceforge.net/lists/listinfo/spatial-main > |