pub fn sombor_coindex(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the Sombor coindex.
\overline{SO}(G) = Σ_{u<v, (u,v)∉E} √(d(u)²+d(v)²)
Sum over non-adjacent distinct vertex pairs.
§Examples
use rust_igraph::{Graph, sombor_coindex};
// K_3: no non-adjacent pairs → 0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((sombor_coindex(&g).unwrap()).abs() < 1e-10);
// Path 0-1-2: non-adjacent pair (0,2), d=(1,1), √(1+1)=√2
let p = Graph::from_edges(&[(0,1),(1,2)], false, Some(3)).unwrap();
assert!((sombor_coindex(&p).unwrap() - 2.0_f64.sqrt()).abs() < 1e-10);