From 5fae321a89149eb1e644b4cd97e37bda1660ed8f Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 30 Mar 2022 15:58:24 +0100 Subject: [PATCH] Added documentation. --- doc/oper.xml | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/z-chap2.xml | 2 ++ 2 files changed, 82 insertions(+) diff --git a/doc/oper.xml b/doc/oper.xml index 324951db2..9e0db3449 100644 --- a/doc/oper.xml +++ b/doc/oper.xml @@ -2227,3 +2227,83 @@ true <#/GAPDoc> + +<#GAPDoc Label="AmalgamDigraphs"> + + + An immutable digraph and a record. + + + AmalgamDigraphs takes as input two digraphs D1 and D2 + and two lists of vertices subdigraphVertices1 and + subdigraphVertices2, which correspond to two identical subdigraphs + of D1 and D2. It returns a new digraph, the amalgam + digraph AD, which consists of D1 and D2 joined + together by their common subdigraph in such a way that the edge connectivity + between the vertices of AD matches the edge connectivity of + D1 and D2.

+ + It returns a tuple of size two, with the first element being + AD and the second element being map, which is a record which + maps each vertex's number in D2 to the corresponding vertex's number + in AD. The mapping of the vertices of D1 can be seen as the + identity mapping. + + T := Digraph([[2, 3], [1, 3], [1, 2]]);; +gap> A := AmalgamDigraphs(T, T, [1, 2], [1, 2]); +[ , + rec( 1 := 1, 2 := 2, 3 := 4 ) ] +gap> A := AmalgamDigraphs(A[1], T, [1, 2], [1, 2]); +[ , + rec( 1 := 1, 2 := 2, 3 := 5 ) ] +gap> P := PetersenGraph();; +gap> G := Digraph([[2, 3, 4], [1, 3], [1, 2, 5], +> [1, 6], [3, 6], [4, 5]]);; +gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]); +[ , + rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ] +]]> + + +<#/GAPDoc> + +<#GAPDoc Label="AmalgamDigraphsIsomorphic"> + + + An immutable digraph and a record. + + + AmalgamDigraphsIsomorphic is meant to function very similarly to + AmalgamDigraphs. The difference is that in AmalgamDigraphs + subdigraphVertices1 and subdigraphVertices2 need not + necessarily describe identical subdigraphs of D1 and D2, + but need only describe subdigraphs that are isomorphic to one another. + AmalgamDigraphsIsomorphic rearranges the entries of + subdigraphVertices2 to obtain newSubdigraphVertices2 + in such a way that the induced subdigraph in D2 with the + vertices newSubdigraphVertices2 is identical to the induced + subdigraph in D1 with the vertices subdigraphVertices1. + AmalgamDigraphsIsomorphic then calls AmalgamDigraphs + with newSubdigraphVertices2 in the place of + subdigraphVertices2. + + P := PetersenGraph();; +gap> G := Digraph([[2, 3, 4], [1, 3], +> [1, 2, 5], [1, 6], [3, 6], [4, 5]]);; +gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 3, 5, 6, 4]); +[ , + rec( 1 := 1, 2 := 11, 3 := 2, 4 := 5, 5 := 7, 6 := 10 ) ] +gap> A := AmalgamDigraphsIsomorphic(P, G, +> [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]); +[ , + rec( 1 := 1, 2 := 11, 3 := 5, 4 := 2, 5 := 10, 6 := 7 ) ] +gap> A := AmalgamDigraphs(P, G, [1, 2, 7, 10, 5], [1, 4, 6, 3, 5]); +Error, the two subdigraphs must be equal. +]]> + + +<#/GAPDoc> diff --git a/doc/z-chap2.xml b/doc/z-chap2.xml index 9de59949e..33a4e3c6e 100644 --- a/doc/z-chap2.xml +++ b/doc/z-chap2.xml @@ -74,6 +74,8 @@ <#Include Label="DistanceDigraph"> <#Include Label="DigraphClosure"> <#Include Label="DigraphMycielskian"> + <#Include Label="AmalgamDigraphs"> + <#Include Label="AmalgamDigraphsIsomorphic">

Random digraphs