I have a set of elements that have a distance measure between them. I am looking for a way to find the closest pair of elements out of this set. Using loops I would use the foll