Back

is-maximal-matching? (clj)

(source)

function

(is-maximal-matching? g matching)
Decides whether the given set represents a valid maximal matching in G. A *maximal matching* in a graph is a matching in which adding any edge would cause the set to no longer be a valid matching. 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 maximal matching in the graph.

Examples