grinpy.invariants.matching.max_matching

grinpy.invariants.matching.max_matching(G)

Return a maximum matching in G.

A maximum matching is a largest set of edges such that no two edges in the set have a common endpoint.

Parameters:G (NetworkX graph) – An undirected graph.
Returns:A list of edges in a maximum matching.
Return type:list