pub fn degree_diff_connectivity(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the degree difference connectivity index.
DDC(G) = Σ_{(u,v)∈E} 1/√(|d(u)-d(v)|+1)
Each term is in (0,1], equalling 1 when d(u)=d(v).
For regular graphs: DDC(G) = m. Self-loops are skipped.
§Examples
use rust_igraph::{Graph, degree_diff_connectivity};
// K_3: 3 edges, all (2,2) → 3·1 = 3
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((degree_diff_connectivity(&g).unwrap() - 3.0).abs() < 1e-10);