pub fn general_sum_connectivity_index(
graph: &Graph,
alpha: f64,
) -> IgraphResult<f64>Expand description
Compute the general sum-connectivity index χ_α(G).
χ_α(G) = Σ_{(u,v)∈E} (d_u + d_v)^α
Special cases: α = −0.5 gives the sum-connectivity index;
α = 1 gives the first Zagreb index M₁.
Self-loops and edges with d_u + d_v = 0 are skipped.
§Examples
use rust_igraph::{Graph, general_sum_connectivity_index};
// K_3: all degrees 2, α = 1 → 3 · (2+2)^1 = 12
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((general_sum_connectivity_index(&g, 1.0).unwrap() - 12.0).abs() < 1e-10);