Skip to content

Commit

Permalink
Move function
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCBrammer committed Dec 22, 2024
1 parent 6e0c24d commit 3368ebe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tucan/canonicalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ def partition_molecule_by_attribute(
return m_partitioned


def partitioning_is_discrete(m):
return m.graph["n_partitions"] == m.number_of_nodes()


def refine_partitions(m: nx.Graph) -> Generator[nx.Graph, None, None]:
n_partitions = m.graph["n_partitions"]
m_refined = partition_molecule_by_attribute(m, PARTITION, copy=False)
Expand Down Expand Up @@ -89,6 +85,10 @@ def filter_out_automorphisms(ms: list[nx.Graph]) -> list[nx.Graph]:
return list(filtered_ms)


def partitioning_is_discrete(m):
return m.graph["n_partitions"] == m.number_of_nodes()


def get_refinement_tree_levels(
m: nx.Graph, filter_automorphisms: bool = True
) -> Generator[list[nx.Graph], None, None]:
Expand Down

0 comments on commit 3368ebe

Please sign in to comment.