pub fn min_degree_connectivity_ratio(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the vertex connectivity ratio.
Approximates vertex connectivity as the minimum degree (a lower bound on κ(G) by Whitney’s theorem), then normalizes by average degree. Values near 1 indicate the graph is nearly optimally connected relative to its density. Returns 0.0 for disconnected or trivial graphs.
§Examples
use rust_igraph::{Graph, min_degree_connectivity_ratio};
// K_4: min_deg=3, avg_deg=3 → ratio=1.0
let g = Graph::from_edges(
&[(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)], false, Some(4)
).unwrap();
assert!((min_degree_connectivity_ratio(&g).unwrap() - 1.0).abs() < 1e-10);