diff --git a/.gitignore b/.gitignore index bbab7b8..cb15f4b 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,6 @@ orb.la orb_la-orb.lo src/pkgconfig.h src/stamp-h1 - +*.DS_Store +*.swp +*.swo diff --git a/gap/hash.gi b/gap/hash.gi index cc246ad..32724c8 100644 --- a/gap/hash.gi +++ b/gap/hash.gi @@ -778,10 +778,21 @@ else end ); fi; -InstallGlobalFunction( ORB_HashFunctionForTransformations, -function(t,data) - return ORB_HashFunctionForPlainFlatList(t![1],data); -end ); +if CompareVersionNumbers(GAPInfo.Version,"4.7") then + InstallGlobalFunction( ORB_HashFunctionForTransformations, + function(t,data) + if IsTrans2Rep(t) then + return HashKeyBag(t,255,0,2*DegreeOfTransformation(t)) mod data + 1; + else + return HashKeyBag(t,255,0,4*DegreeOfTransformation(t)) mod data + 1; + fi; + end ); +else + InstallGlobalFunction( ORB_HashFunctionForTransformations, + function(t,data) + return ORB_HashFunctionForPlainFlatList(t![1],data); + end ); +fi; InstallGlobalFunction( MakeHashFunctionForPlainFlatList, function( len )