pub fn gutman_index(graph: &Graph) -> IgraphResult<u64>Expand description
Compute the Gutman index.
Gut(G) = Σ_{u<v} deg(u) · deg(v) · d(u, v)
§Examples
use rust_igraph::{Graph, gutman_index};
// Path 0-1-2: degrees [1,2,1]
// (0,1): 1·2·1=2, (0,2): 1·1·2=2, (1,2): 2·1·1=2
// Gut = 6
let g = Graph::from_edges(&[(0,1),(1,2)], false, Some(3)).unwrap();
assert_eq!(gutman_index(&g).unwrap(), 6);