This documents the development version of NetworkX. Documentation for the current release can be found here.
Decides whether the given set or dictionary represents a valid matching in
A matching in a graph is a set of edges in which no two distinct edges share a common endpoint.
- GNetworkX graph
- matchingdict or set
A dictionary or set representing a matching. If a dictionary, it must have
matching[u] == vand
matching[v] == ufor each edge
(u, v)in the matching. If a set, it must have elements of the form
(u, v), where
(u, v)is an edge in the matching.
Whether the given set or dictionary represents a valid matching in the graph.