finding euclidean distance,better code?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sat Mar 29 06:01:53 EDT 2008
On Sat, 29 Mar 2008 10:11:28 +0100, Roel Schroeven wrote:
> Steven D'Aprano schreef:
>> On Fri, 28 Mar 2008 16:59:59 +0100, Robert Bossy wrote:
>>
>>> Gabriel Genellina wrote:
>>>> That's what I said in another paragraph. "sum of coordinates" is
>>>> using a different distance definition; it's the way you measure
>>>> distance in a city with square blocks. I don't know if the distance
>>>> itself has a name, but
>>> I think it is called Manhattan distance in reference of the walking
>>> distance from one point to another in this city.
>>
>> You know, there are other cities than Manhattan. Some of them even have
>> streets and blocks.
>
> I'm not sure what your point is. The name
"The" name? You go on to list four additional names, so why do you say
that "Manhattan distance" is THE name? When I studied this at university,
we called it the taxi metric.
> of the distance happens to be
> Manhattan distance (or taxicab distance, rectilinear distance, L1
> distance, city block distance; see
> http://en.wikipedia.org/wiki/Manhattan_distance) so Robert has a valid
> point.
Wikipedia doesn't believe that M-D is the primary or most common name,
and the link you give redirects to "Taxicab distance". Googlefight
agrees: "Taxicab distance" is more than twice as common, and "rectilinear
distance" more than five times as common.
My point was to draw attention to Robert's unconscious assumptions which
are reflected in his choice of language. Rectilinear distance applies to
more than "distance from one point to another in THIS city" (emphasis
added).
It applies in parts of Rome, Sydney, London, Moscow and many other
places. It even applies to sleepy little country towns like Bendigo and
Mildura here in Australia. Manhattan is hardly the only place where
cities are carved up into rectangular or square city blocks, and I doubt
that it applies to the entirety of Manhattan. It also applies to
supermarket isles, church pews, chess boards, pixels on a monitor and no
doubt other places as well.
The very name is New York-centric, just as much as if the English called
the science of acoustics "Big-Ben-onics" in reference to the peals of Big
Ben's clock. I had thought I had pointed that out with a little gentle
understatement.
--
Steven
More information about the Python-list
mailing list