From c58374e6fb057b2daa60bb7a54882e26f1748771 Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Tue, 9 Jul 2024 21:18:53 +0200 Subject: [PATCH] Remove debug checks of alternating tree --- python/mwmatching/algorithm.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/python/mwmatching/algorithm.py b/python/mwmatching/algorithm.py index b529fd4..f908d30 100644 --- a/python/mwmatching/algorithm.py +++ b/python/mwmatching/algorithm.py @@ -1067,22 +1067,6 @@ class MatchingContext: else: self.remove_blossom_label_t(blossom) - def _check_alternating_tree_consistency(self) -> None: - """TODO -- remove this function, only for debugging""" - for blossom in itertools.chain(self.trivial_blossom, - self.nontrivial_blossom): - if (blossom.parent is None) and (blossom.label != LABEL_NONE): - assert blossom.tree_blossoms is not None - assert blossom in blossom.tree_blossoms - if blossom.tree_edge is not None: - bx = self.vertex_set_node[blossom.tree_edge[0]].find() - by = self.vertex_set_node[blossom.tree_edge[1]].find() - assert bx.tree_blossoms is blossom.tree_blossoms - assert by.tree_blossoms is blossom.tree_blossoms - else: - assert blossom.tree_edge is None - assert blossom.tree_blossoms is None - def remove_alternating_tree(self, tree_blossoms: set[Blossom]) -> None: """Reset the alternating tree consisting of the specified blossoms. @@ -1827,8 +1811,6 @@ class MatchingContext: # This loop runs through at most O(n) iterations per stage. while True: - # self._check_alternating_tree_consistency() # TODO -- remove this - # Consider the incident edges of newly labeled S-vertices. self.scan_new_s_vertices()