Re: finding 3rd nearest neighbors in very large data [message #45911] |
Thu, 20 October 2005 11:39 |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Thu, 20 Oct 2005 00:56:10 -0700, snfinder@naver.com wrote:
> Hi~!
>
> I read the "My IDL Program Speed Improved by a Factor of 8100!!!"
> (http://www.dfanning.com/code_tips/slowloops.html) I am in the almost same
> situation.
> Although I read that seriously, but I couldn't coding properly for my
> situation.
> My data is 3D data. Therefore each point has x,y and z coordinates. The
> number of points is about 9 million. --; So I had trouble to make array
> for allocate data.
>
> I wanted to use function nearest_neighbors, but I couldn't find how can
> expand triangulate function from 2D to 3D.
I'd follow the link from that page to:
http://www.cs.umd.edu/~mount/ANN/
which is a C++ library for exact and approximate nearest neighbor
computation. 3D NN calculations don't typically use a Voronoi diagram
(the dual of the Delaunay triangulation I used in the 2D case), but
some kind of search tree like a kd-tree. There is an analog to
Delaunay triangulation in 3D, called Delaunay tessellation, but I
don't think IDL implements it. Rather than attempt to invent this
from scratch yourself, you'd probably be better off learning how to
use a library created by experts in the field. If you really needed
it available in IDL, you could explore linking it in via a DLM.
JD
|
|
|