CouplingGraph.maximal_matching

CouplingGraph.maximal_matching(edges_to_ignore=[], randomize=False)[source]

Generate a random graph matching for the coupling graph. Edges in the ignored_edges list will not be included.

Parameters:
  • edges_to_ignore (list[tuple[int]]) – Edges not included in the matching. (Default: [])

  • randomize (bool) – Shuffle edges to create random matchings. (Default: False)

Returns:

A maximal list of edges that share

no common verticies.

Return type:

matching (list[tuple[int]])