pub fn narumi_katayama_index(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the Narumi-Katayama index.
NK(G) = Π_{v∈V, d(v)≥1} d(v)
The product of all non-zero vertex degrees. Isolated vertices (degree 0) are excluded from the product. Returns 1.0 for the empty graph or an edgeless graph (empty product).
§Examples
use rust_igraph::{Graph, narumi_katayama_index};
// K_3: degrees [2,2,2] → NK = 2·2·2 = 8
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!((narumi_katayama_index(&g).unwrap() - 8.0).abs() < 1e-10);