Open yirkajk opened 6 years ago
is_matching is terribly written.
should it: 1) take a graph and a set of edges and check if the set of edges is a matching, or 2) should it take a graph and check if that graph has no incident edges ?
in case (2), what the current code seems to attempt, is to check if for g, g.size() == 2*g.order()
in case (2) it should just check that the minimum and maximum degree is 1.
There is another issue: there are two functions named is_matching
. One in properties and one in utilities. The one in utilities seems to be a correct implementation of case (2)
Error:
<type 'exceptions.AttributeError'> 'list' object has no attribute 'degree'
Problem is in this function's call to
is_matching
.