pub fn degree_neighbor_max_sum(graph: &Graph) -> IgraphResult<u64>Expand description
Compute the sum of maximum neighbor degrees.
Σ_{v: d(v)>0} max_{u ∈ N(v)} d(u)
For each non-isolated vertex, finds the highest degree among its neighbors and sums these maxima. Returns 0 for edgeless graphs.
§Examples
use rust_igraph::{Graph, degree_neighbor_max_sum};
// Star S_5: center max=1, 4 leaves max=4 → 1 + 4·4 = 17
let g = Graph::from_edges(&[(0,1),(0,2),(0,3),(0,4)], false, Some(5)).unwrap();
assert_eq!(degree_neighbor_max_sum(&g).unwrap(), 17);