Skip to content

Commit

Permalink
replacing custom algorithm with Digraph library call
Browse files Browse the repository at this point in the history
  • Loading branch information
egri-nagy committed Aug 12, 2023
1 parent 66b0e09 commit e472f20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
24 changes: 3 additions & 21 deletions lib/linearnotation.gi
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,9 @@
# of its functional digraph.
# A component is a list of points, and the components are returned in a list.
TransformationComponents := function(t)
local visited,comps, i,actualcomp;
comps := []; #components will be represented as list of points
visited := []; #we keep track of the points we visited already
#seemingly going through all points...
for i in [1..DegreeOfTransformation(t)] do
#...but skipping those that are already in some component
if not (i in visited) then
Add(comps,[]); #let's start with a fresh new component
actualcomp := comps[Length(comps)]; #make the last to the actual one
repeat
AddSet(actualcomp,i);
AddSet(visited,i);
i := i ^ t;
until i in visited; #keep adding until we bump into something known
if not (i in actualcomp) then #known but not in actual component -> merge
Append(First(comps, c -> i in c), actualcomp);
Remove(comps); # & remove the last component
fi;
fi;
od;
return comps;
return DigraphConnectedComponents(
DigraphByEdges(List([1..DegreeOfTransformation(t)],
i->[i,OnPoints(i,t)]))).comps;
end;
MakeReadOnlyGlobal("TransformationComponents");

Expand Down
3 changes: 0 additions & 3 deletions lib/skeleton.gi
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ end);
################################################################################

#the subduction Hasse diagram of representatives


InstallMethod(SubductionEquivClassRelation,
"for a skeleton (SgpDec)", [IsSkeleton],
function(sk)
Expand Down Expand Up @@ -279,7 +277,6 @@ function(sk)
fi;
end);


#returns the representative element of the scc of a finiteset
InstallGlobalFunction(RepresentativeSet,
function(sk, finiteset)
Expand Down

0 comments on commit e472f20

Please sign in to comment.