3 ms·
Manhattan distance then. It is easier to work out the Euclidian distance though between 2 coordinates.
by sycren 14y ago
Manhattan distance then. It is easier to work out the Euclidian distance though between 2 coordinates.
- textminer 14y agoAbout computationally as complex, no? The Manhattan distance would just be the sum of the absolute difference in the two coordinates. The Manhattan and Euclidean distance on finite spaces both generalize to "l_p norms" (1 and 2, respectively) on an n-dimensional Euclidean space, where ||x||_p = (|x_0|^p + |x_1|^p + ... + |x_n|^p)^(1/p). You can even naturally define it in the limit where p goes to infinity! http://en.wikipedia.org/wiki/Lp_space http://en.wikipedia.org/wiki/Lp_space