calculateEuclideanDistance function

Given a 2D data structure, it calculates the euclidean distance among all the points.