-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
Steps To Reproduce
Each element of automorphism group acts on the graph vertices by permuting (relabeling) them. It is therefore very natural for .relabel()
to support automorphism group's elements.
sage: G = graphs.CycleGraph(5)
sage: A = G.automorphism_group()
sage: H = G.random_orientation()
sage: a = A.random_element()
sage: print(a)
(0,3,1,4,2)
sage: H.relabel(a,inplace=False).show()
Expected Behavior
For a given automorphism a
, each graph vertex v
should be relabeled into a(v)
.
Actual Behavior
At the moment .relabel()
misunderstands a given graph's automorphism by issuing an wrongful error message NotImplementedError: Non injective relabeling
. Elements of automorphism group do define injective labeling.
Additional Information
A workaround is to call H.relabel(lambda v: a(v),...)
instead of H.relabel(a,...)
.
Environment
- **OS**: Ubuntu 22.04.3 LTS
- **Sage Version**: 10.3.beta7
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide