pub fn degree_assortativity_proxy(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the degree assortativity proxy.
Pearson correlation coefficient of degrees at edge endpoints. Positive values indicate assortative mixing (high-degree nodes connect to high-degree nodes). Returns 0.0 for graphs with fewer than 2 edges or constant degree.
§Examples
use rust_igraph::{Graph, degree_assortativity_proxy};
// K_3: all degrees equal → 0.0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!(degree_assortativity_proxy(&g).unwrap().abs() < 1e-10);