Skip to main content

exponential_forgotten

Function exponential_forgotten 

Source
pub fn exponential_forgotten(graph: &Graph) -> IgraphResult<f64>
Expand description

Compute the exponential forgotten index.

eF(G) = Σ_v e^{d(v)³}

For each vertex, the contribution is e raised to the cube of its degree. Isolated vertices contribute e^0 = 1.

§Examples

use rust_igraph::{Graph, exponential_forgotten};

// K_3: 3 vertices with d=2 → 3·e^8
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((exponential_forgotten(&g).unwrap() - 3.0 * 8.0_f64.exp()).abs() < 1e-6);