From 291d3ead8b7c045d59086016f40cbd48b3efd741 Mon Sep 17 00:00:00 2001 From: Joris van Rantwijk Date: Wed, 8 Feb 2023 19:24:14 +0100 Subject: [PATCH] Mark static methods --- python/max_weight_matching.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/max_weight_matching.py b/python/max_weight_matching.py index 3a11577..b856abb 100644 --- a/python/max_weight_matching.py +++ b/python/max_weight_matching.py @@ -644,7 +644,8 @@ class _MatchingContext: return (best_index, best_slack) - def lset_new_blossom(self, blossom: _Blossom) -> None: + @staticmethod + def lset_new_blossom(blossom: _Blossom) -> None: """Start tracking edges for a new S-blossom.""" assert blossom.best_edge == -1 if isinstance(blossom, _NonTrivialBlossom): @@ -959,8 +960,8 @@ class _MatchingContext: # Merge least-slack edges for the S-sub-blossoms. self.lset_merge_blossoms(blossom) + @staticmethod def find_path_through_blossom( - self, blossom: _NonTrivialBlossom, sub: _Blossom ) -> tuple[list[_Blossom], list[tuple[int, int]]]: