diff --git a/gap/oper.gi b/gap/oper.gi index b4349dab4..8e72d8af7 100644 --- a/gap/oper.gi +++ b/gap/oper.gi @@ -1087,6 +1087,16 @@ function(D, perms) return OnDigraphs(D, perms[1]); end); +# DomainForAction returns `true` instead of a proper domain here as a stopgap +# measure to ensure that the Orbit method of GAP uses a SparseHashTable instead +# of a DictionaryByPosition. +# As SparseIntKey for digraphs does not depend on the domain, and always +# returns DigraphHash, the actual returned value of DomainForAction does not +# matter as long as it returns something other than `fail`. +InstallMethod(DomainForAction, "for a digraph, list or collection and function", +[IsDigraph, IsListOrCollection, IsFunction], +ReturnTrue); + ############################################################################# # 5. Substructures and quotients ############################################################################# diff --git a/tst/standard/oper.tst b/tst/standard/oper.tst index 99fa35aad..e149d23eb 100644 --- a/tst/standard/oper.tst +++ b/tst/standard/oper.tst @@ -211,6 +211,10 @@ gap> OnMultiDigraphs(gr1, [(1, 3), (1, 7)]); Error, the 2nd entry of the 2nd argument must permute the edges of the\ digraph that is the 1st argument, +# DomainForAction +gap> DomainForAction(RandomDigraph(10), SymmetricGroup(10), OnDigraphs); +true + # InNeighboursOfVertex and InDegreeOfVertex gap> gr := DigraphFromDiSparse6String(".IgBGLQ?Apkc");