aryagraph.algorithms.matching.maximal_matching#
- aryagraph.algorithms.matching.maximal_matching(g: Graph) set[tuple[Hashable, Hashable]][source]#
A maximal matching (no edge can be added), greedily in edge order. O(m).
Its size is at least half the maximum; use
max_weight_matching()withmaxcardinality=Truefor a maximum one.