Skip to content

Commit f3d2ff6

Browse files
committed
Add comments and a few tiny changes
1 parent a6380fc commit f3d2ff6

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

Diff for: gap/OrbitalGraphs.gi

+12-13
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ function(G, n)
2323
return OrbitalGraphs(G, [1 .. n]);
2424
end);
2525

26-
# The code below is essentially stolen from ferret;
27-
# Do we want to give a naive version that
28-
# just computes all orbital graphs, one that only
29-
# gives a representative in the isomorphism class,
30-
# and a version that gives the ones actually used in
31-
# backtrack?
26+
# The code below was originally essentially stolen from ferret.
27+
# Do we want to give different versions of this:
28+
# a naive version that just computes all orbital graphs,
29+
# a version that only gives a representative in the isomorphism class, and
30+
# a version that gives the ones actually used in backtrack?
3231
#
3332
InstallMethod(OrbitalGraphs, "for a permutation group and a homogeneous list",
3433
[IsPermGroup, IsHomogeneousList],
@@ -71,7 +70,9 @@ function(G, points)
7170
moved := Intersection(points, MovedPoints(G));
7271
orbitsG := Orbits(G, moved);
7372

73+
# FIXME: Currently unused
7474
orbsizes := [];
75+
# FIXME: Currently unused
7576
orbpos := [];
7677

7778
# Efficently store size of orbits of values
@@ -83,15 +84,16 @@ function(G, points)
8384
od;
8485

8586
innerorblist := List(orbitsG, o -> Orbits(Stabilizer(G, o[1]), moved));
87+
# FIXME: Currently unused
8688
orbitsizes := List([1..Length(orbitsG)],
8789
x -> List(innerorblist[x], y -> Size(orbitsG[x])*Size(y)));
8890

89-
for i in [1..Size(orbitsG)] do
91+
for i in [1..Length(orbitsG)] do
9092
orb := orbitsG[i];
9193
orbreps := [];
9294

9395
for iorb in innerorblist[i] do
94-
if not(orb[1] = iorb[1] and Size(iorb) = 1)
96+
if not (Size(iorb) = 1 and orb[1] = iorb[1]) # No loopy orbitals
9597
then
9698
graph := List([1..maxval], x -> []);
9799
if IsEmpty(orbreps) then
@@ -103,11 +105,10 @@ function(G, points)
103105
od;
104106
D := Digraph(graph);
105107
SetUnderlyingGroup(D, G);
106-
Add(graphlist, D);
108+
AddSet(graphlist, D);
107109
fi;
108110
od;
109111
od;
110-
Sort(graphlist);
111112
Perform(graphlist, function(x) SetFilterObj(x, IsOrbitalGraphOfGroup); end);
112113
return graphlist;
113114
end);
@@ -162,9 +163,7 @@ end);
162163

163164

164165
InstallMethod(OrbitalIndex, "for a permutation group", [IsPermGroup],
165-
function(G)
166-
return Index(OrbitalClosure(G), G);
167-
end);
166+
{G} -> Index(OrbitalClosure(G), G));
168167

169168

170169
## Recognising a group from its orbital graphs

0 commit comments

Comments
 (0)