Definition of the Euclidean distance is taken from (Mitchell1997, p. 232).