diff options
Diffstat (limited to 'networkx')
-rw-r--r-- | networkx/algorithms/approximation/matching.py | 2 | ||||
-rw-r--r-- | networkx/algorithms/isomorphism/tree_isomorphism.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/networkx/algorithms/approximation/matching.py b/networkx/algorithms/approximation/matching.py index 17a52eda..6a60b11b 100644 --- a/networkx/algorithms/approximation/matching.py +++ b/networkx/algorithms/approximation/matching.py @@ -31,7 +31,7 @@ def min_maximal_matching(G): Notes ----- - The algorithm computes an approximate solution fo the minimum maximal + The algorithm computes an approximate solution for the minimum maximal cardinality matching problem. The solution is no more than 2 * OPT in size. Runtime is $O(|E|)$. diff --git a/networkx/algorithms/isomorphism/tree_isomorphism.py b/networkx/algorithms/isomorphism/tree_isomorphism.py index 372224ca..1ff9f004 100644 --- a/networkx/algorithms/isomorphism/tree_isomorphism.py +++ b/networkx/algorithms/isomorphism/tree_isomorphism.py @@ -269,11 +269,11 @@ def tree_isomorphism(t1, t2): # If there both have 2 centers, then try the first for t1 # with the first for t2. - attemps = rooted_tree_isomorphism(t1, center1[0], t2, center2[0]) + attempts = rooted_tree_isomorphism(t1, center1[0], t2, center2[0]) # If that worked we're done. - if len(attemps) > 0: - return attemps + if len(attempts) > 0: + return attempts # Otherwise, try center1[0] with the center2[1], and see if that works return rooted_tree_isomorphism(t1, center1[0], t2, center2[1]) |