Digraphs
Digraphs copied to clipboard
Implemented ^ operator for digraphs to delegate to OnDigraphs (issue #580)
Resolves issue #580.
Edited oper.gi file to allow D ^ p (digraph and permutation) and D ^ t (digraph and transformation) to call OnDigraphs(D, p) and OnDigraphs(D, t), respectively.
Thanks for the PR!
Some tests are failing here, and I think the key is that you've installed a method without first declaring the operation.
The trick to fixing this is to go into oper.gd and add a DeclareOperation statement for these two filters.
@james-d-mitchell @mtorpey I’ve added tests for this issue. I had to adjust the formatting a few times since the GitHub checks were failing initially. The tests run correctly when I execute them manually, but I’m still getting a Syntax warning: Unbound global variable in stream:1. I’m not entirely sure what the best way to address this is (as you can see I’ve tried a few approaches).
Just to confirm for the documentation, should I add it in pkg/Digraphs/doc/oper.xml following the same structure used for the other methods in that file?
@james-d-mitchell @mtorpey I’ve added tests for this issue. I had to adjust the formatting a few times since the GitHub checks were failing initially. The tests run correctly when I execute them manually, but I’m still getting a
Syntax warning: Unbound global variable in stream:1. I’m not entirely sure what the best way to address this is (as you can see I’ve tried a few approaches).
I've commented directly on the line that's wrong, you're reporting the exact error you'd get if you typed local some_variables; at the command line in GAP.
Just to confirm for the documentation, should I add it in
pkg/Digraphs/doc/oper.xmlfollowing the same structure used for the other methods in that file?
Yes @devansh2605 that's correct.
Happy with this, while noting that this currently isn't documented. I'd suggest adding a paragraph in the OnDigraphs documentation noting the new alternative syntax, since I'm not sure there's actually a man entry for a symbol like ^.
@mtorpey I have made the changes, please let me know if everything is in order or any other modifications are required.