pub fn irga_index(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the geometric-arithmetic irregularity index.
IRGA(G) = Σ_{(u,v)∈E} ln((d(u)+d(v)) / (2√(d(u)·d(v))))
By AM-GM inequality, each term is ≥ 0. Equals 0 for regular graphs. Edges with degree-0 endpoint are skipped. Self-loops are skipped.
§Examples
use rust_igraph::{Graph, irga_index};
// K_3: all degrees 2, IRGA = 0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!(irga_index(&g).unwrap().abs() < 1e-10);