pub fn sum_connectivity_index(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the sum-connectivity index.
SCI(G) = Σ_{(u,v)∈E} 1/√(d_u + d_v)
Self-loops are skipped. Edges where both endpoints have degree 0 (impossible in practice) are skipped.
§Examples
use rust_igraph::{Graph, sum_connectivity_index};
// Path 0-1-2: degrees [1,2,1]
// edge(0,1): 1/√3, edge(1,2): 1/√3
// SCI = 2/√3
let g = Graph::from_edges(&[(0,1),(1,2)], false, Some(3)).unwrap();
assert!((sum_connectivity_index(&g).unwrap() - 2.0/3.0_f64.sqrt()).abs() < 1e-10);