Added method for calculating eccentricity of nodes. Eccentricity is the maximum distance from a given node to all other nodes.