diff --git a/lib/dicthf.gi b/lib/dicthf.gi index 8383c1bb32..a5563bb83c 100644 --- a/lib/dicthf.gi +++ b/lib/dicthf.gi @@ -51,7 +51,7 @@ BindGlobal("HashKeyWholeBag", {x,y} -> HASHKEY_BAG(x,y,0,-1)); ############################################################################# ## -#M DenseIntKey() +#M SparseIntKey() ## InstallMethod(SparseIntKey,"for finite Gaussian row spaces",true, [ IsFFECollColl and IsGaussianRowSpace,IsObject ], 0, @@ -130,6 +130,25 @@ local f,n,bytelen,data,qq,i; fi; end); +############################################################################# +## +#M SparseIntKey() +## +InstallMethod(SparseIntKey,"for bounded tuples",true, + [ IsList,IsList and IsCyclotomicCollection ], 0, +function(m,v) +local c,t; + if Length(m)<>3 or m[1]<>"BoundedTuples" then + TryNextMethod(); + fi; + t:=Maximum(m[2])+1; + c:=[1,Maximum(m[2])+1]; + return function(a) + return a*c; + end; + +end); + SparseIntKeyVecListAndMatrix:=function(d,m) local f,n,pow,fct; if IsList(d) and Length(d)>0 and IsMatrix(d[1]) then diff --git a/lib/oprt.gi b/lib/oprt.gi index 4461258fa5..28da1eb369 100644 --- a/lib/oprt.gi +++ b/lib/oprt.gi @@ -3559,6 +3559,23 @@ local xset,dom,D,b,t,i,r,binv,pos,kero,dets,roots,dim,f; return fail; # no extra vector found end); +############################################################################# +## +#M DomainForAction( , , ) +## +InstallMethod(DomainForAction,"permutations on lists of integers",true, + [IsList,IsListOrCollection and IsPermCollection,IsFunction],0, +function(pnt,acts,act) + local m; + if not (Length(pnt)>0 and ForAll(pnt,IsPosInt) and + (act=OnSets or act=OnPoints or act=OnRight or act=\^)) then + TryNextMethod(); + fi; + m:=Maximum(Maximum(pnt),LargestMovedPoint(acts)); + # workaround to avoid creating formal objects of bounded tuples + return ["BoundedTuples",[1..m],Length(pnt)]; +end); + ############################################################################# ## #M DomainForAction( , , )