pub fn exponential_randic(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the exponential Randić index.
ER(G) = Σ_{(u,v)∈E} exp(1 / √(du·dv))
Edges with a degree-0 endpoint are skipped. Self-loops are skipped.
§Examples
use rust_igraph::{Graph, exponential_randic};
// K_3: 3 edges, d=(2,2), each exp(1/2) → 3·exp(0.5)
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
let expected = 3.0 * 0.5_f64.exp();
assert!((exponential_randic(&g).unwrap() - expected).abs() < 1e-10);