Skip to main content

reduced_forgotten_index

Function reduced_forgotten_index 

Source
pub fn reduced_forgotten_index(graph: &Graph) -> IgraphResult<u64>
Expand description

Compute the reduced forgotten index.

F_red(G) = Σ_v (d(v)-1)³

Vertices with degree 0 are skipped.

§Examples

use rust_igraph::{Graph, reduced_forgotten_index};

// K_4: d=(3,3,3,3), each (3-1)³=8 → 32
let g = Graph::from_edges(
    &[(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)], false, Some(4)
).unwrap();
assert_eq!(reduced_forgotten_index(&g).unwrap(), 32);