distance function

Calculate the squared Euclidean distance between pairs of points