pub fn degree_concentration(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the degree concentration.
Returns the fraction of vertices that have the mode degree. Values close to 1.0 indicate a nearly regular graph. Returns 0.0 for empty graphs.
§Examples
use rust_igraph::{Graph, degree_concentration};
// K_3: all degree 2 → concentration = 1.0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((degree_concentration(&g).unwrap() - 1.0).abs() < 1e-10);