Calculate distances
Add superEdge distance calculation.