Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed May 26, 2021
1 parent 06ed27f commit 5924a1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ gap> IsCayleyDigraph(D);
true
gap> IsVertexTransitive(D);
true]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="StarDigraph">
<ManSection>
Expand Down
6 changes: 4 additions & 2 deletions gap/grape.gi
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,13 @@ InstallMethod(CayleyDigraphCons,
"for IsImmutableDigraph, group, and list of elements",
[IsImmutableDigraph, IsGroup, IsHomogeneousList],
function(filt, G, gens)
local D, edge_labels;
# This method is a duplicate of the one above because the method for Digraph
# sets some additional attributes if IsImmutableDigraph is passed as 1st
# argument, and so we don't want to make a mutable version of the returned
# graph, and then make it immutable, because then those attributes won't be
# set.
local D;

if not IsFinite(G) then
ErrorNoReturn("the 2nd argument (a group) must be finite");
elif not ForAll(gens, x -> x in G) then
Expand All @@ -136,7 +137,8 @@ function(filt, G, gens)
SetGeneratorsOfCayleyDigraph(D, gens);
SetDigraphVertexLabels(D, AsList(G));
# Out-neighbours of identity give the correspondence between edges & gens
edge_labels := elts{OutNeighboursOfVertex(D, Position(AsList(G), One(G)))};
edge_labels := AsList(G){OutNeighboursOfVertex(D,
Position(AsList(G), One(G)))};
SetDigraphEdgeLabels(D, ListWithIdenticalEntries(Size(G), edge_labels));
return D;
end);
Expand Down
1 change: 1 addition & 0 deletions tst/standard/examples.tst
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ gap> BookDigraph(IsMutable, 12);
gap> IsSymmetricDigraph(BookDigraph(24));
true
gap> IsBipartiteDigraph(BookDigraph(32));
true
# PancakeGraph
gap> D := PancakeGraph(3);
Expand Down

0 comments on commit 5924a1d

Please sign in to comment.