Module kdtree::distance

source ·
Expand description

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

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