From 297cd8ecceb959cc440328d0d93ab7e7ff498fa3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 24 Mar 2024 02:19:27 +0100 Subject: [PATCH 1/3] Fix for GAP 4.13 --- gap/vecobj.gi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gap/vecobj.gi b/gap/vecobj.gi index af7804e..7ee6998 100644 --- a/gap/vecobj.gi +++ b/gap/vecobj.gi @@ -242,7 +242,7 @@ end); InstallMethod(ConstructingFilter, [IsMeataxe64VectorObj], v->IsMeataxe64VectorObj); -InstallMethod(NewVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsList], +InstallTagBasedMethod(NewVector, IsMeataxe64VectorObj, function (t, f, l) local m; m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1, Length(l)); @@ -250,7 +250,7 @@ InstallMethod(NewVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsList], return MakeMeataxe64Vector(m); end); -InstallMethod(NewZeroVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsInt], +InstallTagBasedMethod(NewZeroVector, IsMeataxe64VectorObj, function (t, f, len) local m; m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1,len); From 709ef337a2cb1a10e067aa459ebcccaa3f428f72 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Mon, 9 Sep 2024 12:16:16 +0200 Subject: [PATCH 2/3] compatibility with GAP 4.12 and 4.13 - add `InstallMethodOrTagBasedMethod` - use it in the methods for `NewMatrix`, `NewZeroMatrix`, `NewVector`, `NewZeroVector` --- gap/matobj.gi | 4 ++-- gap/vecobj.gi | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gap/matobj.gi b/gap/matobj.gi index 5bc2113..67fa0a6 100644 --- a/gap/matobj.gi +++ b/gap/matobj.gi @@ -55,12 +55,12 @@ if IsBound(CompatibleVectorFilter) then fi; -InstallMethod(NewZeroMatrix,[IsMeataxe64MatrixObj, IsField and IsFinite, IsInt, IsInt], +InstallMethodOrTagBasedMethod(NewZeroMatrix,[IsMeataxe64MatrixObj, IsField and IsFinite, IsInt, IsInt], {filt, R, nor, noc} -> MakeMeataxe64Matrix(MTX64_NewMatrix(MTX64_FiniteField(Size(R)), nor, noc))); -InstallMethod(NewMatrix,[IsMeataxe64MatrixObj, IsField and IsFinite, IsInt, IsList], +InstallMethodOrTagBasedMethod(NewMatrix,[IsMeataxe64MatrixObj, IsField and IsFinite, IsInt, IsList], function(filt, R, noc, list) local nor, m, i, l; if Length(list) = 0 then diff --git a/gap/vecobj.gi b/gap/vecobj.gi index 7ee6998..0472510 100644 --- a/gap/vecobj.gi +++ b/gap/vecobj.gi @@ -13,6 +13,16 @@ # +# for compatibility with both GAP 4.13 and older GAP versions +BindGlobal("InstallMethodOrTagBasedMethod", function(oper, requirements, method) + if IsBoundGlobal("InstallTagBasedMethod") then + # for GAP 4.13 or newer + ValueGlobal("InstallTagBasedMethod")(oper, requirements[1], method); + else + # for GAP 4.12 or older + InstallMethod(oper, requirements, method); + fi; +end); InstallGlobalFunction(UnderlyingMeataxe64Matrix, @@ -242,7 +252,7 @@ end); InstallMethod(ConstructingFilter, [IsMeataxe64VectorObj], v->IsMeataxe64VectorObj); -InstallTagBasedMethod(NewVector, IsMeataxe64VectorObj, +InstallMethodOrTagBasedMethod(NewVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsList], function (t, f, l) local m; m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1, Length(l)); @@ -250,7 +260,7 @@ InstallTagBasedMethod(NewVector, IsMeataxe64VectorObj, return MakeMeataxe64Vector(m); end); -InstallTagBasedMethod(NewZeroVector, IsMeataxe64VectorObj, +InstallMethodOrTagBasedMethod(NewZeroVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsInt], function (t, f, len) local m; m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1,len); From 7b00ac44d9a623574119e1ece493548501833325 Mon Sep 17 00:00:00 2001 From: ThomasBreuer Date: Mon, 9 Sep 2024 13:42:58 +0200 Subject: [PATCH 3/3] update installation instructions --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a6d98fe..ab0ccc8 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ to be compiled). Clone the GIT repository and then, from the top directory do ``` -./autogen.sh -./configure --with-gap-root= +./configure make ```