Skip to main content

first_hyper_gourava_index

Function first_hyper_gourava_index 

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

Compute the first hyper-Gourava index.

HGO₁(G) = Σ_{(u,v)∈E} [d(u)+d(v)+d(u)·d(v)]²

Self-loops are skipped.

§Examples

use rust_igraph::{Graph, first_hyper_gourava_index};

// K_3: each edge [2+2+4]²=64, 3 edges → 192
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert_eq!(first_hyper_gourava_index(&g).unwrap(), 192);