is_vertex_cover

Function is_vertex_cover 

Source
pub fn is_vertex_cover(
    num_vertices: usize,
    edges: &[(usize, usize)],
    selected: &[bool],
) -> bool
Expand description

Check if a set of vertices forms a vertex cover.

ยงArguments

  • num_vertices - Total number of vertices
  • edges - List of edges as (u, v) pairs
  • selected - Boolean slice indicating which vertices are selected