pub fn edge_pi_index(graph: &Graph) -> IgraphResult<u64>Expand description
Compute the edge-PI index.
PI_e(G) = Σ_{(u,v)∈E} [m_u(e) + m_v(e)]
Edge version of the Padmakar-Ivan index. Uses the same proximity definition as the edge-Szeged index.
§Examples
use rust_igraph::{Graph, edge_pi_index};
// Path 0-1-2:
// edge (0,1): m_0=0, m_1=1 → sum=1
// edge (1,2): m_1=1, m_2=0 → sum=1
// PI_e = 2
let g = Graph::from_edges(&[(0,1),(1,2)], false, Some(3)).unwrap();
assert_eq!(edge_pi_index(&g).unwrap(), 2);