Skip to content
Prev 301637 / 398503 Next

Nearest Neighbors

Actually if you are looking for neighbors of neighbors you only need the
nearest neighbor for each point. The problem is that the nearest neighbor of
the nearest neighbor of point 1 is often point 1. Did you want the nearest
neighbor not counting any point twice? Sounds more like a traveling salesman
problem or nearest link cluster analysis.
nn2 nn3 nn4
 [1,] 53   1  53   1
 [2,] 34   2  34   2
 [3,] 67   3  67   3
 [4,] 35  60  46  60
 [5,] 82   5  82   5
 [6,] 10   6  10   6
 [7,] 48   7  48   7
 [8,] 40   8  40   8
 [9,] 25   9  25   9
[10,]  6  10   6  10

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352