pub fn degree_median_ad(graph: &Graph) -> IgraphResult<f64>Expand description
Compute the median absolute deviation of the degree sequence.
MedAD(G) = median_v |d(v) - median(d)|
The most robust dispersion measure — the median of absolute deviations from the median. Returns 0.0 for empty graphs.
§Examples
use rust_igraph::{Graph, degree_median_ad};
// K_3: all degrees equal → MedAD = 0
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert!(degree_median_ad(&g).unwrap().abs() < 1e-10);