in reply to getting my neighbours in an N-dimensional space
Finding nearest neighbors is a classic problem in the field of computational geometry. There are algorithms to create a data structure that enables the nearest neighbors to be found very quickly.
A simple example is to find the closest pair of points in a plane. The slow way is to measure the distance between each of the points and find which is smallest. This requires (N*N-N)/2 distance comparisons, where N is the number of points. The fast way is to compute a particular type of triangular mesh to join the points. The closest pair will be linked by one of the edges of the triangles. While there is some extra computing for creating the mesh, this algorithm is still a big win.
If you need this type of fast algorithm, look at the home page for Qhull. In particular, you need the Voronoi object. The Qhull page says that it has been used for at least eight dimensional analysis.
It should work perfectly the first time! - toma
msg me if this is not clear or if you would like
more information on this topic.
|
|---|