Skip to content

Commit

Permalink
Add DigraphCycle as a synonym for CycleDigraph
Browse files Browse the repository at this point in the history
See issue #401.
  • Loading branch information
wilfwilson committed Mar 22, 2021
1 parent 24af130 commit 34ee6c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,11 @@ gap> ChainDigraph(IsMutableDigraph, 10);
<#GAPDoc Label="CycleDigraph">
<ManSection>
<Oper Name="CycleDigraph" Arg="[filt, ]n"/>
<Oper Name="DigraphCycle" Arg="[filt, ]n"/>
<Returns>A digraph.</Returns>
<Description>
If <A>n</A> is a positive integer, this function returns a <E>cycle</E>
digraph with <A>n</A> vertices and <A>n</A> edges. Specifically,
If <A>n</A> is a positive integer, then these functions return a <E>cycle
digraph</E> with <A>n</A> vertices and <A>n</A> edges. Specifically,
for each vertex <C>i</C> (with <C>i</C> &lt; <C>n</C>), there is a directed
edge with source <C>i</C> and range <C>i + 1</C>. In addition, there is
an edge with source <C>n</C> and range <C>1</C>. <P/>
Expand All @@ -184,6 +185,8 @@ gap> CycleDigraph(123);
<immutable cycle digraph with 123 vertices>
gap> CycleDigraph(IsMutableDigraph, 10);
<mutable digraph with 10 vertices, 10 edges>
gap> DigraphCycle(4) = CycleDigraph(4);
true
]]></Example>
</Description>
</ManSection>
Expand Down
1 change: 1 addition & 0 deletions gap/examples.gd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ DeclareOperation("ChainDigraph", [IsFunction, IsPosInt]);
DeclareConstructor("CycleDigraphCons", [IsDigraph, IsPosInt]);
DeclareOperation("CycleDigraph", [IsPosInt]);
DeclareOperation("CycleDigraph", [IsFunction, IsPosInt]);
DeclareSynonym("DigraphCycle", CycleDigraph);

DeclareConstructor("JohnsonDigraphCons", [IsDigraph, IsInt, IsInt]);
DeclareOperation("JohnsonDigraph", [IsInt, IsInt]);
Expand Down
2 changes: 2 additions & 0 deletions tst/standard/examples.tst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ gap> gr := CycleDigraph(1000);
<immutable cycle digraph with 1000 vertices>
gap> gr := CycleDigraph(IsMutableDigraph, 6);
<mutable digraph with 6 vertices, 6 edges>
gap> gr = DigraphCycle(IsImmutableDigraph, 6);
true
# ChainDigraph
gap> gr := ChainDigraph(0);
Expand Down

0 comments on commit 34ee6c9

Please sign in to comment.