Skip to main content

neighborhood_forgotten_index

Function neighborhood_forgotten_index 

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

Compute the neighborhood forgotten index.

NF(G) = Σ_v S(v)³ where S(v) = Σ_{u∈N(v)} d(u).

Vertex-level cubes of neighbor degree sums.

§Examples

use rust_igraph::{Graph, neighborhood_forgotten_index};

// K_3: S(v)=4 for all v, NF = 3 × 64 = 192
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert_eq!(neighborhood_forgotten_index(&g).unwrap(), 192);