Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina Anagnostopoulou-Merkouri authored and james-d-mitchell committed Nov 18, 2020
1 parent 9eb2f16 commit 47d9f2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions doc/oper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,38 @@ gap> DigraphShortestDistance(D, [1, 3], [3, 5]);
</ManSection>
<#/GAPDoc>

<#GapDoc Label= "Dominators2">
<ManSection>
<Oper Name="Dominators2"
Arg="digraph, root"
<Returns>A list of lists </Returns>
<Description>
Dominators2 is a function that takes a <A>digraph</A> and a specific root
<A>vertex</A> and returns the dominators of each vertex with respect to
the root. The root must be a verex of the digraph. The algorithm is an
implementation of the fast algorith written by Thomas Lengauer and Robert
Endre Tarjan. If there is no path from the root to a specific vertex,
the output will contain a hole in the corresponding position.
<Example><! [CDATA[
gap> d := Digraph([[2], [3, 6], [2, 4], [1], [], [3]]);
<immutable digraph with 6 vertices, 7 edges>
gap> Dominators2(d, 1);
[ [ 1 ], [ 2, 1 ], [ 3, 2, 1 ], [ 4, 3, 2, 1 ],, [ 6, 2, 1 ] ]
gap> Dominators2(d, 2);
[ [ 1, 4, 3, 2 ], [ 2 ], [ 3, 2 ], [ 4, 3, 2 ],, [ 6, 2 ] ]
gap> Dominators2(d, 3);
[ [ 1, 4, 3 ], [ 2, 3 ], [ 3 ], [ 4, 3 ],, [ 6, 2, 3 ] ]
gap> Dominators2(d, 4);
[ [ 1, 4 ], [ 2, 1, 4 ], [ 3, 2, 1, 4 ], [ 4 ],, [ 6, 2, 1, 4 ] ]
gap> Dominators2(d, 5);
[ ,,,, [ 5 ] ]
gap> Dominators2(d, 6);
[ [ 1, 4, 3, 6 ], [ 2, 3, 6 ], [ 3, 6 ], [ 4, 3, 6 ],, [ 6 ] ]
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="PartialOrderDigraphMeetOfVertices">
<ManSection>
<Oper Name="PartialOrderDigraphMeetOfVertices"
Expand Down
1 change: 1 addition & 0 deletions doc/z-chap4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<#Include Label="IsReachable">
<#Include Label="DigraphPath">
<#Include Label="DigraphShortestPath">
<#Include Label="Dominators2">
<#Include Label="IteratorOfPaths">
<#Include Label="DigraphAllSimpleCircuits">
<#Include Label="DigraphLongestSimpleCircuit">
Expand Down

0 comments on commit 47d9f2a

Please sign in to comment.