cut_size

Function cut_size 

Source
pub fn cut_size<W>(edges: &[(usize, usize, W)], partition: &[bool]) -> W
where W: Clone + Zero + AddAssign,
Expand description

Compute the cut size for a given partition.

ยงArguments

  • edges - List of weighted edges as (u, v, weight) triples
  • partition - Boolean slice indicating which set each vertex belongs to