Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for GAP 4.13 #47

Merged
merged 3 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ to be compiled).
Clone the GIT repository and then, from the top directory do

```
./autogen.sh
./configure --with-gap-root=<path to your GAP root directory>
./configure <path to your GAP root directory>
make
```

Expand Down
4 changes: 2 additions & 2 deletions gap/matobj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions gap/vecobj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -242,15 +252,15 @@ end);
InstallMethod(ConstructingFilter, [IsMeataxe64VectorObj],
v->IsMeataxe64VectorObj);

InstallMethod(NewVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsList],
InstallMethodOrTagBasedMethod(NewVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsList],
function (t, f, l)
local m;
m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1, Length(l));
MTX64_InsertVector(m,l,0);
return MakeMeataxe64Vector(m);
end);

InstallMethod(NewZeroVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsInt],
InstallMethodOrTagBasedMethod(NewZeroVector, [IsMeataxe64VectorObj, IsField and IsFinite, IsInt],
function (t, f, len)
local m;
m := MTX64_NewMatrix(MTX64_FiniteField(Size(f)), 1,len);
Expand Down
Loading