Home »
Public Forums »
archive »
Nearest neighbors
Nearest neighbors [message #68252] |
Wed, 07 October 2009 17:01 |
N. Johnson
Messages: 2 Registered: October 2009
|
Junior Member |
|
|
I have a set of latitude/longitude pairs and I need to find the n
closest neighbors for all of them. I'm trying to use the
nearest_neighbors() function found on this page:
http://www.dfanning.com/code_tips/slowloops.html
However, when I attempt to run the function, I get an error on the
line:
p=c[c[point]:c[point+1]-1] ;start with this point's DT neighbors
because c[point] is equal to c[point+1]. Since I don't know exactly
what the function is doing, I don't know how to fix it. If it matters,
I have a lot of lat/lon pairs (~1e6) and there may be duplicates.
Any suggestions?
Nathan Johnson
|
|
|
Current Time: Wed Oct 08 18:59:52 PDT 2025
Total time taken to generate the page: 0.00433 seconds