pub fn symmetric_degree_ratio(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the symmetric degree ratio index.
SR(G) = Σ_{(u,v)∈E} (d(u)/d(v) + d(v)/d(u))
Each term ≥ 2 by AM-GM, with equality when d(u)=d(v).
For regular graphs: SR(G) = 2m. Edges with a degree-0 endpoint
are skipped. Self-loops are skipped.
§Examples
use rust_igraph::{Graph, symmetric_degree_ratio};
// 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!((symmetric_degree_ratio(&g).unwrap() - 6.0).abs() < 1e-10);