The eccentricity of a vertex is the maximal distance between the given vertex and any other vertex in the graph. It gives a measure of how far away a vertex is from the rest of the graph.
i1 : eccentricity(pathGraph 5, 2) o1 = 2 |
i2 : eccentricity(pathGraph 5, 1) o2 = 3 |
i3 : eccentricity(pathGraph 5, 0) o3 = 4 |
The object eccentricity is a method function.