Back
is-matching? (clj)
(source)function
(is-matching? g matching)
Decides whether the given set represents a valid matching in G.
A *matching* in a graph is a set of edges in which no two distinct
edges share a common endpoint.
Parameters
----------
`g` : graph
`matching` : set
A set representing a matching. It must have elements
of the form #{u v}, where [u v] is an edge in the
matching.
Returns
-------
boolean
Whether the given set represents a valid matching
in the graph.