Andy Dougherty wrote: > Assuming x and y are coordinates in a 2-d space, and that both are > integers >= 0, why not just use what is affectionately called the > "taxicab" metric: x+y? It is just as "valid" and even quicker to > compute than the Euclidean metric sqrt(x^2 + y^2).
Yes! Very incisive thinking, Andy. > Of course the ordering of which is "closer" is different depending > on the metric chosen -- which is partly my point. If the actual > result obtained from a calculation would differ in any significant > way depending on which metric were used, then it might be a warning > sign that there's a higher-level problem at hand. Yes; but I believe that we know the "right" answer, and that is that the taxicab metric is definitively better. What we're really talking about is "displacement" or "removal" in type space, and to take a hypoteneuse is to presume that param1 and param2 can be "mixed" together dimensionally. Plus it's faster to compute: (n-1) additions, rather than n mults + (n-1) adds. -- John Douglas Porter __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com