The eccentricity of a vertex is calculated by measuring the shortest
distance from (or to) the vertex, to (or from) all vertices in the graph,
and taking the maximum.
This implementation ignores vertex pairs that are in different components.
Isolate vertices have eccentricity zero.