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

Increase required version of Digraphs and remove some redundant code #921

Merged
merged 2 commits into from
May 17, 2023
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
2 changes: 1 addition & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ PackageDoc := rec(
Dependencies := rec(
GAP := ">=4.12.0",
NeededOtherPackages := [["datastructures", ">=0.2.5"],
["digraphs", ">=1.5.0"],
["digraphs", ">=1.6.2"],
["genss", ">=1.6.5"],
["images", ">=1.3.1"],
["IO", ">=4.5.1"],
Expand Down
25 changes: 0 additions & 25 deletions gap/elements/pperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,6 @@
##
#############################################################################

if ApplicableMethod(AsDigraph, [PartialPerm([])]) = fail then
# The method below (or an equivalent) will only be introduced in Digraphs >
# 1.5.0, this should be removed when Semigroups requires Digraphs > 1.5.0

DeclareOperation("AsDigraph", [IsPartialPerm]);

InstallMethod(AsDigraph, "for a partial perm", [IsPartialPerm],
function(f)
local n, list, x, i;
n := Maximum(DegreeOfPartialPerm(f), CodegreeOfPartialPerm(f));
list := EmptyPlist(n);
for i in [1 .. n] do
x := i ^ f;
if x > n then
return fail;
elif x <> 0 then
list[i] := [x];
else
list[i] := [];
fi;
od;
return DigraphNC(IsImmutableDigraph, list);
end);
fi;

InstallMethod(IndexPeriodOfSemigroupElement, "for a partial perm",
[IsPartialPerm], IndexPeriodOfPartialPerm);

Expand Down
6 changes: 3 additions & 3 deletions src/conglatt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ namespace semigroups {

// not noexcept because the constructors of std::vector and std::array
// aren't
UF(UF const&) = default;
UF(UF const&) = default;
UF& operator=(UF const&) = default;
UF(UF&&) = default;
UF& operator=(UF&&) = default;
~UF() = default;
UF& operator=(UF&&) = default;
~UF() = default;

// not noexcept because std::vector::operator[] isn't
index_type find(index_type x) const {
Expand Down