From 04fe0aeea36be2e04d4045397ff705370448c684 Mon Sep 17 00:00:00 2001 From: Shun Kashiwa Date: Tue, 5 Mar 2024 15:01:03 -0800 Subject: [PATCH] change poset's hash to only consider edges --- src/c3py/poset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c3py/poset.py b/src/c3py/poset.py index 69fcca7..4b4c9e5 100644 --- a/src/c3py/poset.py +++ b/src/c3py/poset.py @@ -20,7 +20,8 @@ def __eq__(self, __value: object) -> bool: return self == __value def __hash__(self) -> int: - return hash(nx.weisfeiler_lehman_graph_hash(self.G)) + # for our purposes, we only care about the set of edges + return hash(frozenset(self.G.edges)) def link(self, a: str, b: str): self.G.add_edge(a, b)