Faster way to compare two sets of points in N-dimensional space?

Posted by Amit on Stack Overflow See other posts from Stack Overflow or by Amit
Published on 2010-05-26T06:43:39Z Indexed on 2010/05/26 7:01 UTC
Read the original article Hit count: 189

List1 contains a high number (~7^10) of N-dimensional points (N <=10), List2 contains the same or fewer number of N-dimensional points (N <=10).

My task is this: I want to check which point in List2 is closest (euclidean distance) to a point in List1 for every point in List1 and subsequently perform some operation on it. I have been doing it the simple- the nested loop way when I didn't have more than 50 points in List1, but with 7^10 points, this obviously takes up a lot of time.

What is the fastest way to do this? Any concepts from Computational Geometry might help?

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about math