[][src]Module kdtree::distance

Defines different distance metrics, in simplest case it defines the euclidean distance which is no more than the square root of the sum of the squares of the distances in each dimension.

Functions

squared_euclidean

Returns the squared euclidean distance between two points, when you only need to compare distances, rhather than having the exact distance between the points this metric is benefitial because it avoids the expensive square root computation.