En Fri, 28 Mar 2008 12:15:48 -0300, harryos <[EMAIL PROTECTED]> escribió:
>> The code is pretty legible as it is now. Anyway, using min() and a >> generator: >> >> > > hi > is this calculated distance really Euclidean distance? When i checked > wikipedia http://en.wikipedia.org/wiki/Euclidean_distance > it shows a calculation involving sum of squares of the differences of > elements.Here in this code ,the sum of coordinates are used? is that a > different measure? (Thanks for trimming the irrelevant parts of the message, that's good; but you trimmed too much text, even attribution lines - the above quoted sentence was mine) 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 the norm from which it is derived is called norm-1, or L1; the usual euclidean distance is derived from norm-2. See http://mathworld.wolfram.com/VectorNorm.html If you only want to see if two things are "close enough", this provides a faster measure than the euclidean distance. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list