Skip to content

Commit

Permalink
Fix planarity (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards authored Sep 5, 2024
1 parent be9154d commit a6da28d
Show file tree
Hide file tree
Showing 13 changed files with 364 additions and 183 deletions.
42 changes: 42 additions & 0 deletions doc/attr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,48 @@ gap> DigraphNrEdges(D);
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="DigraphNrAdjacencies">
<ManSection>
<Attr Name="DigraphNrAdjacencies" Arg="digraph" />
<Returns>An integer.</Returns>
<Description> Returns the number of sets <M>\{u, v\}</M> of vertices of the digraph <A>digraph</A>, such that
either <M>(u, v)</M> or <M>(v, u)</M> is an edge. The following equality holds for
any digraph <C>D</C> with no multiple edges: <C>DigraphNrAdjacencies(D) * 2 - DigraphNrLoops(D)
= DigraphNrEdges(DigraphSymmetricClosure(D))</C>.
<Example><![CDATA[
gap> gr := Digraph([
> [1, 3, 4, 5], [1, 2, 3, 5], [2, 4, 5], [2, 4, 5], [1]]);;
gap> DigraphNrAdjacencies(gr);
13
gap> DigraphNrAdjacencies(gr) * 2 - DigraphNrLoops(gr) =
> DigraphNrEdges(DigraphSymmetricClosure(gr));
true
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="DigraphNrAdjacenciesWithoutLoops">
<ManSection>
<Attr Name="DigraphNrAdjacenciesWithoutLoops" Arg="digraph" />
<Returns>An integer.</Returns>
<Description> Returns the number of sets <M>\{u, v\}</M> of vertices of the digraph <A>digraph</A>, such that
<M>u \neq v</M> and either <M>(u, v)</M> or <M>(v, u)</M> is an edge. The following equality holds for
any digraph <C>D</C> with no multiple edges: <C>DigraphNrAdjacenciesWithoutLoops(D) * 2 + DigraphNrLoops(D)
= DigraphNrEdges(DigraphSymmetricClosure(D))</C>.
<Example><![CDATA[
gap> gr := Digraph([
> [1, 3, 4, 5], [1, 2, 3, 5], [2, 4, 5], [2, 4, 5], [1]]);;
gap> DigraphNrAdjacenciesWithoutLoops(gr);
10
gap> DigraphNrAdjacenciesWithoutLoops(gr) * 2 + DigraphNrLoops(gr) =
> DigraphNrEdges(DigraphSymmetricClosure(gr));
true
]]></Example>
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="DigraphNrLoops">
<ManSection>
<Attr Name="DigraphNrLoops" Arg="digraph"/>
Expand Down
124 changes: 64 additions & 60 deletions doc/planar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,15 @@ true
<Attr Name="KuratowskiPlanarSubdigraph" Arg="digraph"/>
<Returns>A list or <K>fail</K>.</Returns>
<Description>
<C>KuratowskiPlanarSubdigraph</C> returns the immutable list of
lists of out-neighbours of a (not necessarily induced) subdigraph of the
digraph <A>digraph</A> that witnesses the fact that <A>digraph</A> is not
planar, or <K>fail</K> if <A>digraph</A> is planar. In other words,
<C>KuratowskiPlanarSubdigraph</C> returns the out-neighbours of a
subdigraph of <A>digraph</A> that is homeomorphic to the complete graph
with <C>5</C> vertices, or to the complete bipartite graph with vertex sets
of sizes <C>3</C> and <C>3</C>. <P/>
<C>KuratowskiPlanarSubdigraph</C> returns the immutable list of lists of
out-neighbours of an induced subdigraph (excluding multiple edges and loops)
of the digraph <A>digraph</A> that witnesses the fact that <A>digraph</A> is
not planar, or <K>fail</K> if <A>digraph</A> is planar. In other words,
<C>KuratowskiPlanarSubdigraph</C> returns the out-neighbours of a subdigraph
of <A>digraph</A> that is homeomorphic to the complete graph with <C>5</C>
vertices, or to the complete bipartite graph with vertex sets of sizes
<C>3</C> and <C>3</C>.
<P/>

The directions and multiplicities of any edges in <A>digraph</A> are
ignored when considering whether or not <A>digraph</A> is planar. <P/>
Expand All @@ -145,8 +146,8 @@ gap> D := Digraph([[2, 4, 7, 9, 10], [1, 3, 4, 6, 9, 10], [6, 10],
gap> IsPlanarDigraph(D);
false
gap> KuratowskiPlanarSubdigraph(D);
[ [ 2, 9, 7 ], [ 3 ], [ 6 ], [ 5, 9 ], [ 6 ], [ ], [ 4 ],
[ 7, 9, 3 ], [ ], [ ] ]
[ [ 2, 9, 7 ], [ 1, 3 ], [ 6 ], [ 5, 9 ], [ 6, 4 ], [ 3, 5 ], [ 4 ],
[ 7, 9, 3 ], [ 8 ], [ ] ]
gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 25 edges>
Expand All @@ -160,8 +161,8 @@ gap> D := Digraph(IsMutableDigraph, [[2, 4, 7, 9, 10],
gap> IsPlanarDigraph(D);
false
gap> KuratowskiPlanarSubdigraph(D);
[ [ 2, 9, 7 ], [ 3 ], [ 6 ], [ 5, 9 ], [ 6 ], [ ], [ 4 ],
[ 7, 9, 3 ], [ ], [ ] ]
[ [ 2, 9, 7 ], [ 1, 3 ], [ 6 ], [ 5, 9 ], [ 6, 4 ], [ 3, 5 ], [ 4 ],
[ 7, 9, 3 ], [ 8 ], [ ] ]
]]></Example>
</Description>
</ManSection>
Expand All @@ -173,17 +174,18 @@ gap> KuratowskiPlanarSubdigraph(D);
<Returns>A list or <K>fail</K>.</Returns>
<Description>
<C>KuratowskiOuterPlanarSubdigraph</C> returns the immutable list of
immutable lists of out-neighbours of a (not necessarily induced)
subdigraph of the digraph <A>digraph</A> that witnesses the fact
that <A>digraph</A> is not outer planar, or <K>fail</K> if
<A>digraph</A> is outer planar. In other words,
immutable lists of out-neighbours of an induced subdigraph (excluding
multiple edges and loops) of the digraph <A>digraph</A> that witnesses the
fact that <A>digraph</A> is not outer planar, or <K>fail</K> if
<A>digraph</A> is outer planar. In other words,
<C>KuratowskiOuterPlanarSubdigraph</C> returns the out-neighbours of a
subdigraph of <A>digraph</A> that is homeomorphic to the complete graph
with <C>4</C> vertices, or to the complete bipartite graph with vertex sets
of sizes <C>2</C> and <C>3</C>. <P/>
subdigraph of <A>digraph</A> that is homeomorphic to the complete graph with
<C>4</C> vertices, or to the complete bipartite graph with vertex sets of
sizes <C>2</C> and <C>3</C>.
<P/>

The directions and multiplicities of any edges in <A>digraph</A> are
ignored when considering whether or not <A>digraph</A> is outer planar.
The directions and multiplicities of any edges in <A>digraph</A> are ignored
when considering whether or not <A>digraph</A> is outer planar.
<P/>

See also
Expand All @@ -201,23 +203,23 @@ gap> D := Digraph([[3, 5, 10], [8, 9, 10], [1, 4], [3, 6],
> [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<immutable digraph with 11 vertices, 25 edges>
gap> KuratowskiOuterPlanarSubdigraph(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> D := Digraph([[2, 4, 7, 9, 10], [1, 3, 4, 6, 9, 10], [6, 10],
> [2, 5, 8, 9], [1, 2, 3, 4, 6, 7, 9, 10], [3, 4, 5, 7, 9, 10],
> [3, 4, 5, 6, 9, 10], [3, 4, 5, 7, 9], [2, 3, 5, 6, 7, 8], [3, 5]]);
<immutable digraph with 10 vertices, 50 edges>
gap> IsOuterPlanarDigraph(D);
false
gap> KuratowskiOuterPlanarSubdigraph(D);
[ [ ], [ ], [ ], [ 8, 9 ], [ ], [ ], [ 9, 4 ], [ 7, 9 ], [ ],
[ ] ]
[ [ ], [ ], [ ], [ 8, 9 ], [ ], [ ], [ 9, 4 ], [ 7, 9, 4 ],
[ 8, 7 ], [ ] ]
gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 25 edges>
gap> KuratowskiOuterPlanarSubdigraph(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> D := Digraph(IsMutableDigraph, [[2, 4, 7, 9, 10],
> [1, 3, 4, 6, 9, 10], [6, 10], [2, 5, 8, 9],
> [1, 2, 3, 4, 6, 7, 9, 10], [3, 4, 5, 7, 9, 10],
Expand All @@ -226,8 +228,8 @@ gap> D := Digraph(IsMutableDigraph, [[2, 4, 7, 9, 10],
gap> IsOuterPlanarDigraph(D);
false
gap> KuratowskiOuterPlanarSubdigraph(D);
[ [ ], [ ], [ ], [ 8, 9 ], [ ], [ ], [ 9, 4 ], [ 7, 9 ], [ ],
[ ] ]]]></Example>
[ [ ], [ ], [ ], [ 8, 9 ], [ ], [ ], [ 9, 4 ], [ 7, 9, 4 ],
[ 8, 7 ], [ ] ]]]></Example>
</Description>
</ManSection>
<#/GAPDoc>
Expand All @@ -237,14 +239,14 @@ gap> KuratowskiOuterPlanarSubdigraph(D);
<Attr Name="PlanarEmbedding" Arg="digraph"/>
<Returns>A list or <K>fail</K>.</Returns>
<Description>
If <A>digraph</A> is a planar digraph, then
<C>PlanarEmbedding</C> returns the immutable list of lists of
out-neighbours of a subdigraph of <A>digraph</A> such that each vertex's
neighbours are given in clockwise order. If <A>digraph</A> is not planar,
then <K>fail</K> is returned. <P/>
If <A>digraph</A> is a planar digraph, then <C>PlanarEmbedding</C> returns
the immutable list of lists of out-neighbours of <A>digraph</A> (excluding
multiple edges and loops) such that each vertex's neighbours are given in
clockwise order. If <A>digraph</A> is not planar, then <K>fail</K> is
returned. <P/>

The directions and multiplicities of any edges in <A>digraph</A> are
ignored by <C>PlanarEmbedding</C>.
The directions and multiplicities of any edges in <A>digraph</A> are ignored
by <C>PlanarEmbedding</C>.
<P/>

See also
Expand All @@ -260,8 +262,8 @@ gap> D := Digraph([[3, 5, 10], [8, 9, 10], [1, 4], [3, 6],
> [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<immutable digraph with 11 vertices, 25 edges>
gap> PlanarEmbedding(D);
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4 ], [ 6 ], [ 11, 7 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11, 7 ],
[ 7, 4 ], [ 8, 6 ], [ 7, 2 ], [ 2, 11 ], [ 1, 2 ], [ 9, 5 ] ]
gap> D := Digraph([[2, 4, 7, 9, 10], [1, 3, 4, 6, 9, 10], [6, 10],
> [2, 5, 8, 9], [1, 2, 3, 4, 6, 7, 9, 10], [3, 4, 5, 7, 9, 10],
> [3, 4, 5, 6, 9, 10], [3, 4, 5, 7, 9], [2, 3, 5, 6, 7, 8], [3, 5]]);
Expand All @@ -272,8 +274,8 @@ gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 25 edges>
gap> PlanarEmbedding(D);
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4 ], [ 6 ], [ 11, 7 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11, 7 ],
[ 7, 4 ], [ 8, 6 ], [ 7, 2 ], [ 2, 11 ], [ 1, 2 ], [ 9, 5 ] ]
gap> D := Digraph(IsMutableDigraph, [[2, 4, 7, 9, 10],
> [1, 3, 4, 6, 9, 10], [6, 10], [2, 5, 8, 9],
> [1, 2, 3, 4, 6, 7, 9, 10], [3, 4, 5, 7, 9, 10],
Expand All @@ -292,10 +294,10 @@ fail
<Returns>A list or <K>fail</K>.</Returns>
<Description>
If <A>digraph</A> is an outer planar digraph, then
<C>OuterPlanarEmbedding</C> returns the immutable list of lists
of out-neighbours of a subdigraph of <A>digraph</A> such that each
vertex's neighbours are given in clockwise order. If <A>digraph</A> is not
outer planar, then <K>fail</K> is returned. <P/>
<C>OuterPlanarEmbedding</C> returns the immutable list of lists of
out-neighbours of <A>digraph</A> (excluding multiple edges and loops) such
that each vertex's neighbours are given in clockwise order. If
<A>digraph</A> is not outer planar, then <K>fail</K> is returned. <P/>

The directions and multiplicities of any edges in <A>digraph</A> are
ignored by <C>OuterPlanarEmbedding</C>.
Expand All @@ -321,7 +323,7 @@ gap> D := Digraph([[2, 4, 7, 9, 10], [1, 3, 4, 6, 9, 10], [6, 10],
gap> OuterPlanarEmbedding(D);
fail
gap> OuterPlanarEmbedding(CompleteBipartiteDigraph(2, 2));
[ [ 3, 4 ], [ 4, 3 ], [ ], [ ] ]
[ [ 3, 4 ], [ 4, 3 ], [ 2, 1 ], [ 1, 2 ] ]
gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 25 edges>
Expand All @@ -335,7 +337,7 @@ gap> D := Digraph(IsMutableDigraph, [[2, 4, 7, 9, 10],
gap> OuterPlanarEmbedding(D);
fail
gap> OuterPlanarEmbedding(CompleteBipartiteDigraph(2, 2));
[ [ 3, 4 ], [ 4, 3 ], [ ], [ ] ]
[ [ 3, 4 ], [ 4, 3 ], [ 2, 1 ], [ 1, 2 ] ]
]]></Example>
</Description>
</ManSection>
Expand Down Expand Up @@ -369,54 +371,56 @@ gap> D := Digraph([[3, 5, 10], [8, 9, 10], [1, 4], [3, 6], [1, 7, 11],
> [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<immutable digraph with 11 vertices, 25 edges>
gap> SubdigraphHomeomorphicToK4(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 7, 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 7, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> SubdigraphHomeomorphicToK23(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> D := Digraph([[3, 5, 10], [8, 9, 10], [1, 4], [3, 6], [1, 11],
> [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<immutable digraph with 11 vertices, 24 edges>
gap> SubdigraphHomeomorphicToK4(D);
fail
gap> SubdigraphHomeomorphicToK23(D);
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4, 1 ], [ 6, 3 ], [ 11, 1 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 2, 11 ], [ 1, 2 ], [ 9, 5 ] ]
gap> SubdigraphHomeomorphicToK33(D);
fail
gap> SubdigraphHomeomorphicToK23(NullDigraph(0));
fail
gap> SubdigraphHomeomorphicToK33(CompleteDigraph(5));
fail
gap> SubdigraphHomeomorphicToK33(CompleteBipartiteDigraph(3, 3));
[ [ 4, 6, 5 ], [ 4, 5, 6 ], [ 6, 5, 4 ], [ ], [ ], [ ] ]
[ [ 4, 6, 5 ], [ 4, 5, 6 ], [ 6, 5, 4 ], [ 1, 2, 3 ], [ 3, 2, 1 ],
[ 2, 3, 1 ] ]
gap> SubdigraphHomeomorphicToK4(CompleteDigraph(3));
fail
gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 7, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 25 edges>
gap> SubdigraphHomeomorphicToK4(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 7, 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 7, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> SubdigraphHomeomorphicToK23(D);
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 5, 10 ], [ 9, 8, 10 ], [ 4, 1 ], [ 6, 3 ], [ 1, 11 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 11, 2 ], [ 2, 1 ], [ 5, 9 ] ]
gap> D := Digraph(IsMutableDigraph, [[3, 5, 10], [8, 9, 10], [1, 4],
> [3, 6], [1, 11], [4, 7], [6, 8], [2, 7], [2, 11], [1, 2], [5, 9]]);
<mutable digraph with 11 vertices, 24 edges>
gap> SubdigraphHomeomorphicToK4(D);
fail
gap> SubdigraphHomeomorphicToK23(D);
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4 ], [ 6 ], [ 11 ], [ 7 ], [ 8 ],
[ ], [ 11 ], [ ], [ ] ]
[ [ 3, 10, 5 ], [ 10, 8, 9 ], [ 4, 1 ], [ 6, 3 ], [ 11, 1 ],
[ 7, 4 ], [ 8, 6 ], [ 2, 7 ], [ 2, 11 ], [ 1, 2 ], [ 9, 5 ] ]
gap> SubdigraphHomeomorphicToK33(D);
fail
gap> SubdigraphHomeomorphicToK23(NullDigraph(0));
fail
gap> SubdigraphHomeomorphicToK33(CompleteDigraph(5));
fail
gap> SubdigraphHomeomorphicToK33(CompleteBipartiteDigraph(3, 3));
[ [ 4, 6, 5 ], [ 4, 5, 6 ], [ 6, 5, 4 ], [ ], [ ], [ ] ]
[ [ 4, 6, 5 ], [ 4, 5, 6 ], [ 6, 5, 4 ], [ 1, 2, 3 ], [ 3, 2, 1 ],
[ 2, 3, 1 ] ]
gap> SubdigraphHomeomorphicToK4(CompleteDigraph(3));
fail
]]></Example>
Expand Down
2 changes: 2 additions & 0 deletions doc/z-chap4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<#Include Label="DigraphNrVertices">
<#Include Label="DigraphEdges">
<#Include Label="DigraphNrEdges">
<#Include Label="DigraphNrAdjacencies">
<#Include Label="DigraphNrAdjacenciesWithoutLoops">
<#Include Label="DigraphNrLoops">
<#Include Label="DigraphSinks">
<#Include Label="DigraphSources">
Expand Down
2 changes: 2 additions & 0 deletions gap/attr.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ DeclareAttribute("DigraphVertices", IsDigraph);
DeclareAttribute("DigraphNrVertices", IsDigraph);
DeclareAttribute("DigraphEdges", IsDigraph);
DeclareAttribute("DigraphNrEdges", IsDigraph);
DeclareAttribute("DigraphNrAdjacencies", IsDigraph);
DeclareAttribute("DigraphNrAdjacenciesWithoutLoops", IsDigraph);
DeclareAttribute("DigraphNrLoops", IsDigraph);
DeclareAttribute("DigraphHash", IsDigraph);

Expand Down
6 changes: 6 additions & 0 deletions gap/attr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@ function(D)
return m;
end);

InstallMethod(DigraphNrAdjacencies, "for a digraph",
[IsDigraphByOutNeighboursRep], DIGRAPH_NRADJACENCIES);

InstallMethod(DigraphNrAdjacenciesWithoutLoops, "for a digraph",
[IsDigraphByOutNeighboursRep], DIGRAPH_NRADJACENCIESWITHOUTLOOPS);

InstallMethod(DigraphNrLoops,
"for a digraph by out-neighbours",
[IsDigraphByOutNeighboursRep],
Expand Down
Loading

0 comments on commit a6da28d

Please sign in to comment.