pub fn density(graph: &Graph) -> DensityResultExpand description
Computes the density of an undirected graph: 2 * |E| / (|V| * (|V| - 1)).
Returns 0.0 for graphs with fewer than 2 nodes.
pub fn density(graph: &Graph) -> DensityResultComputes the density of an undirected graph: 2 * |E| / (|V| * (|V| - 1)).
Returns 0.0 for graphs with fewer than 2 nodes.