Skip to main content

edge_degree_min_sum

Function edge_degree_min_sum 

Source
pub fn edge_degree_min_sum(graph: &Graph) -> IgraphResult<u64>
Expand description

Compute the edge degree min sum.

EDmin(G) = Σ_{(u,v)∈E} min(d(u), d(v))

Self-loops are skipped. For regular graphs with degree r: EDmin = m·r.

§Examples

use rust_igraph::{Graph, edge_degree_min_sum};

// K_3: 3 edges, all (2,2) → 3·2 = 6
let g = Graph::from_edges(&[(0,1),(1,2),(0,2)], false, Some(3)).unwrap();
assert_eq!(edge_degree_min_sum(&g).unwrap(), 6);