pub fn modified_first_zagreb(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the modified first Zagreb index.
^mM₁(G) = Σ_{v∈V, d_v>0} 1/d_v²
Sums the reciprocal of squared degree over all non-isolated vertices.
§Examples
use rust_igraph::{Graph, modified_first_zagreb};
// K_3: all degrees 2 → 3 · (1/4) = 3/4
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((modified_first_zagreb(&g).unwrap() - 0.75).abs() < 1e-10);