networkx.algorithms.matching.is_perfect_matching¶
-
is_perfect_matching(G, matching)[source]¶ Decides whether the given set represents a valid perfect matching in
G.A perfect matching in a graph is a matching in which exactly one edge is incident upon each vertex.
- Parameters
- Returns
Whether the given set or dictionary represents a valid perfect matching in the graph.
- Return type