Skip to content

Dot updates#434

Merged
james-d-mitchell merged 7 commits into
libsemigroups:mainfrom
james-d-mitchell:dot-updates
May 22, 2026
Merged

Dot updates#434
james-d-mitchell merged 7 commits into
libsemigroups:mainfrom
james-d-mitchell:dot-updates

Conversation

@james-d-mitchell
Copy link
Copy Markdown
Member

Adds the functionality in

libsemigroups/libsemigroups#985

to the python bindings

Copy link
Copy Markdown
Collaborator

@Joseph-Edwards Joseph-Edwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all seems good (modulo one small typo below). I will be happy to merge this once the upstream is merged and the CI passes.

Comment thread src/dot.cpp
Comment thread tests/test_froidure_pin.py Outdated
d = froidure_pin.dot_current_right_cayley_graph(S)
assert isinstance(d, Dot)
assert d.kind() == Dot.Kind.digraph
assert len(d.nodes()) == S.current_size()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion does not hold; d.nodes() also contains the nodes that represent the legend, so is bigger than S.current_size():

>>> from libsemigroups_pybind11 import Transf, FroidurePin, froidure_pin
>>> gens = [Transf([1, 0, 2]), Transf([1, 2, 0]), Transf([0, 0, 1])]
>>> S = FroidurePin(gens)
>>> print(froidure_pin.dot_current_right_cayley_graph(S).nodes())
[<dot node "0">, <dot node "1">, <dot node "2">, <dot node "cluster_legend_head">, <dot node "cluster_legend_tail">]

Is this the intended behaviour @james-d-mitchell?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is the intended behavior the test is rubbish will update!

@Joseph-Edwards
Copy link
Copy Markdown
Collaborator

Seems there is a slight issue with the doc. I'll fix that now then get this merged. Thanks @james-d-mitchell!

@Joseph-Edwards
Copy link
Copy Markdown
Collaborator

Turns out this doc fix isn't quite as simple as I had hoped. Will keep investigating

@james-d-mitchell james-d-mitchell merged commit 5d3bf2b into libsemigroups:main May 22, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants