Skip to content

Commit 743a661

Browse files
IsTwoEdgeTransitive removed support for multidigraphs (#736)
1 parent c553286 commit 743a661

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

doc/prop.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1585,8 +1585,8 @@ false]]></Example>
15851585
<Prop Name="IsTwoEdgeTransitive" Arg="digraph"/>
15861586
<Returns><K>true</K> or <K>false</K>.</Returns>
15871587
<Description>
1588-
If <A>digraph</A> is a digraph, then <C>IsTwoEdgeTransitive</C> returns
1589-
<K>true</K> if <A>digraph</A> is 2-edge transitive, and <K>false</K>
1588+
If <A>digraph</A> is a digraph without multiple edges, then <C>IsTwoEdgeTransitive</C>
1589+
returns <K>true</K> if <A>digraph</A> is 2-edge transitive, and <K>false</K>
15901590
otherwise. A digraph is <E>2-edge transitive</E> if its automorphism group
15911591
acts transitively on its 2-edges via the action
15921592
<Ref Func="OnTuplesTuples" BookName="ref"/>.
@@ -1604,6 +1604,8 @@ gap> IsTwoEdgeTransitive(DigraphByEdges([[1, 2], [2, 3], [3, 1], [3, 4]]))
16041604
false
16051605
gap> IsTwoEdgeTransitive(CycleDigraph(5));
16061606
true
1607+
gap> IsTwoEdgeTransitive(Digraph([[2], [3, 3, 3], []]));
1608+
Error, the argument <D> must be a digraph with no multiple edges,
16071609
]]></Example>
16081610
</Description>
16091611
</ManSection>

gap/prop.gi

+8-1
Original file line numberDiff line numberDiff line change
@@ -687,10 +687,17 @@ function(D)
687687
return LatticeDigraphEmbedding(N5, D) = fail;
688688
end);
689689

690-
InstallMethod(IsTwoEdgeTransitive, "for a digraph", [IsDigraph],
690+
InstallMethod(IsTwoEdgeTransitive,
691+
"for a digraph without multiple edges",
692+
[IsDigraph],
691693
function(D)
692694
local twoEdges;
693695

696+
if IsMultiDigraph(D) then
697+
ErrorNoReturn("the argument <D> must be a digraph with no multiple",
698+
" edges,");
699+
fi;
700+
694701
twoEdges := Filtered(Cartesian(DigraphEdges(D), DigraphEdges(D)),
695702
pair -> pair[1][2] = pair[2][1]
696703
and pair[1][1] <> pair[2][2]);

tst/standard/prop.tst

+2
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,8 @@ gap> IsTwoEdgeTransitive(DigraphByEdges([[1, 2]]));
16941694
true
16951695
gap> IsTwoEdgeTransitive(DigraphByEdges([]));
16961696
true
1697+
gap> IsTwoEdgeTransitive(Digraph([[2], [3, 3, 3], []]));
1698+
Error, the argument <D> must be a digraph with no multiple edges,
16971699

16981700
# DigraphHasNoVertices and DigraphHasAVertex
16991701
gap> List([0 .. 3], i -> DigraphHasAVertex(EmptyDigraph(i)));

tst/testinstall.tst

+4
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@ rec( distances := [ [ 0, 5 ], [ 5, 0 ] ],
436436
gap> EdgeWeightedDigraphShortestPath(d, 1, 2);
437437
[ [ 1, 2 ], [ 1 ] ]
438438
439+
# IsTwoEdgeTransitive
440+
gap> IsTwoEdgeTransitive(DigraphByEdges([[1, 2], [2, 3], [3, 1]]));
441+
true
442+
439443
# Issue 617: bug in DigraphRemoveEdge, wasn't removing edge labels
440444
gap> D := DigraphByEdges(IsMutableDigraph, [[1, 2], [2, 3], [3, 4], [4, 1], [1, 1]]);;
441445
gap> DigraphEdgeLabels(D);

0 commit comments

Comments
 (0)