pub fn augmented_zagreb_index(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the augmented Zagreb index.
AZI(G) = Σ_{(u,v)∈E} (d_u · d_v / (d_u + d_v - 2))³
Self-loops and edges where d_u + d_v ≤ 2 are skipped.
§Examples
use rust_igraph::{Graph, augmented_zagreb_index};
// Path 0-1-2: degrees [1,2,1]
// edge(0,1): (1·2/(1+2-2))³ = 2³ = 8
// edge(1,2): same = 8
// AZI = 16
let g = Graph::from_edges(&[(0,1),(1,2)], false, Some(3)).unwrap();
assert!((augmented_zagreb_index(&g).unwrap() - 16.0).abs() < 1e-10);