Skip to content

Commit

Permalink
raise RuntimeError from "canon_graph() if colored
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobsan committed Sep 24, 2023
1 parent 2750842 commit 010ef80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pynauty/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def canon_graph(g):
return ->
new canonical graph.
'''
if g.vertex_coloring:
raise RuntimeError("canon_graph() is not implemented for vertex-colored graphs yet.")
c = certificate(g)
set_length = len(c) // g.number_of_vertices
sets = [c[set_length*k:set_length*(k+1)] for k in range(g.number_of_vertices)]
Expand Down

0 comments on commit 010ef80

Please sign in to comment.