maximal_matching

Function maximal_matching 

Source
pub fn maximal_matching<N, E, Ix>(graph: &Graph<N, E, Ix>) -> MaximumMatching<N>
where N: Node + Clone + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Finds a maximal matching using a greedy algorithm

A maximal matching is one where no more edges can be added. This is simpler than maximum matching but provides a 2-approximation.

§Arguments

  • graph - The input graph

§Returns

  • A maximal matching