pub fn degree_kurtosis(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the excess kurtosis of the degree distribution.
γ₂ = (1/n) Σ_v ((d(v) - d̄) / σ)⁴ - 3
Measures the “tailedness” of the degree distribution relative to a normal distribution (excess kurtosis = 0 for normal). Returns 0.0 for graphs with fewer than 3 vertices or zero variance.
§Examples
use rust_igraph::{Graph, degree_kurtosis};
// K_4: all degrees equal → kurtosis = -3 (minimal, degenerate)
// Actually: zero variance → returns 0.0
let g = Graph::from_edges(
&[(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)], false, Some(4),
).unwrap();
assert!(degree_kurtosis(&g).unwrap().abs() < 1e-10);