pub fn edge_degree_harmonic_sum(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the edge degree harmonic sum.
Σ_{(u,v)∈E} 2·d(u)·d(v) / (d(u)+d(v))
The harmonic mean of endpoint degrees, summed over all edges.
Self-loops and edges with a degree-0 endpoint are skipped.
Returns 0.0 for edgeless graphs. For regular graphs with
degree r: H = m·r.
§Examples
use rust_igraph::{Graph, edge_degree_harmonic_sum};
// K_3: 3 edges, all (2,2) → 3·2 = 6.0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((edge_degree_harmonic_sum(&g).unwrap() - 6.0).abs() < 1e-10);