From 8d5087060f1ce7ea3a77d5592a971ccc66ccfddf Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Sun, 5 Feb 2023 17:12:35 +0100 Subject: [PATCH] Fix bug in trace_alternating_paths --- python/maximum_weight_matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/maximum_weight_matching.py b/python/maximum_weight_matching.py index 6f46038..279e64a 100644 --- a/python/maximum_weight_matching.py +++ b/python/maximum_weight_matching.py @@ -669,7 +669,7 @@ def _trace_alternating_paths( blossom_marker[b] = False # If we found a common ancestor, trim the paths so they end there. - if first_common == -1: + if first_common != -1: assert vertex_blossom[vedges[-1][0]] == first_common while wedges and (vertex_blossom[wedges[-1][0]] != first_common): wedges.pop()