the graph whose metrics are sought
indicates whether the graph is undirected
Return the central vertices, those with eccentricities equal to the radius.
Compute the diameter of graph 'g' (i.
Compute the diameter of graph 'g' (i.e., maximum eccentricity). This also equals the "longest shortest path" between any pair of vertices in graph 'g'.
Compute the eccentricity of vertex 'i' (the length of the longest path from vertex 'i' to any other vertex).
Compute the eccentricity of vertex 'i' (the length of the longest path from vertex 'i' to any other vertex).
the vertex whose eccentricity is sought
the graph whose metrics are sought
Compute the radius of graph 'g' (i.
Compute the radius of graph 'g' (i.e., minimum eccentricity).
The
GraphMetrics
class provides methods for determining graph metrics that can be efficiently computed using Breadth-First Search (BFS). This works for undirected graphs. If a directed graph is passed in, it will be converted to a corresponding undirected graph.