pub fn edge_degree_mean_sum(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the edge degree mean sum.
EDμ(G) = Σ_{(u,v)∈E} (d(u) + d(v)) / 2
This equals M₁/2 (half the first Zagreb index). Self-loops are
skipped. For regular graphs with degree r: EDμ = m·r.
§Examples
use rust_igraph::{Graph, edge_degree_mean_sum};
// K_3: 3 edges, all (2,2) → 3·2 = 6
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((edge_degree_mean_sum(&g).unwrap() - 6.0).abs() < 1e-10);