pub fn diameter(g: &Adjacency) -> usizeExpand description
The diameter — the longest shortest path (in hops) between any two connected
nodes (undirected). A disconnected graph reports the max over its components (∞
pairs are ignored). 0 for a graph with no edges.