pub fn hub_dominance_ratio(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the hub dominance ratio.
Fraction of edges that are incident to the highest-degree vertex. Measures how much the network depends on a single hub. Returns 0.0 for empty graphs.
§Examples
use rust_igraph::{Graph, hub_dominance_ratio};
// Star_5: center has 4 edges out of 4 total → 1.0
let g = Graph::from_edges(
&[(0,1),(0,2),(0,3),(0,4)], false, Some(5)
).unwrap();
assert!((hub_dominance_ratio(&g).unwrap() - 1.0).abs() < 1e-10);