3 ms·
About computationally as complex, no? The Manhattan distance would just be the sum of the absolute difference in the two coordinates. The Manhattan and Euclide
by textminer 14y ago
About 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