Skip to main content

diameter

Function diameter 

Source
pub fn diameter(g: &Adjacency) -> usize
Expand 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.