check_matching_matrix

check_matching_matrix(M, A)[source]

Validate that adjacency matrix M is a valid matching in graph A.

Return type:

bool

Checks:
  1. M has no edges where A has none.

  2. Each row and column sum of M is at most 1.