Quelle chap3.html
Sprache: HTML
|
|
| products/sources/formale Sprachen/GAP/pkg/digraphs/doc/chap3.html |
 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (Digraphs) - Chapter 3: Creating digraphs</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chap3" onload="jscontent()">
<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chap8.html">8</a> <a href="chap9.html">9</a> <a href="chapA.html">A</a> <a href="chapB.html">B</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div>
<div class="chlinkprevnexttop"> <a href="chap0.html">[Top of Book]</a> <a href="chap0.html#contents">[Contents]</a> <a href="chap2.html">[Previous Chapter]</a> <a href="chap4.html">[Next Chapter]</a> </div>
<p id="mathjaxlink" class="pcenter"><a href="chap3_mj.html">[MathJax on]</a></p>
<p><a id="X7D34861E863A5D93" name="X7D34861E863A5D93"></a></p>
<div class="ChapSects"><a href="chap3.html#X7D34861E863A5D93">3 <span class="Heading">Creating digraphs</span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7D34861E863A5D93">3.1 <span class="Heading">Creating digraphs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7877ADC77F85E630">3.1-1 IsDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D7EDF83820ED6F5">3.1-2 IsMutableDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7CAFAA89804F80BD">3.1-3 IsImmutableDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7E749324800B38A5">3.1-4 IsCayleyDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80F1B6D28478D8B9">3.1-5 IsDigraphWithAdjacencyFunction</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X86E798B779515678">3.1-6 DigraphByOutNeighboursType</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X834843057CE86655">3.1-7 Digraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8023FE387A3AB609">3.1-8 DigraphByAdjacencyMatrix</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7F37B6768349E269">3.1-9 DigraphByEdges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B75C1D680757D6F">3.1-10 EdgeOrbitsDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X81BC49B57EAADEFB">3.1-11 DigraphByInNeighbours</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7FCADADC7EC28478">3.1-12 CayleyDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7BB820C9813F035F">3.1-13 ListNamedDigraphs</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X83608C407CC8836D">3.2 <span class="Heading">Changing representations</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7FBC4BDB82FBEDD2">3.2-1 AsBinaryRelation</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X86834E307EACC670">3.2-2 AsDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B335342839E5146">3.2-3 Graph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7C4F13E080EC16B0">3.2-4 AsGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7C5360B2799943F3">3.2-5 AsTransformation</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X85126078848B420A">3.3 <span class="Heading">New digraphs from old</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X83D93A8A8251E6F9">3.3-1 DigraphImmutableCopy</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8399F7427B227228">3.3-2 DigraphImmutableCopyIfImmutable</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X83C51DA182CCEA2F">3.3-3 InducedSubdigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7CAF093B85A93D2F">3.3-4 ReducedDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X829E3EAC7C4B3B1E">3.3-5 MaximalSymmetricSubdigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X79BA6A66846D5A95">3.3-6 MaximalAntiSymmetricSubdigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DD9766C86D3ED20">3.3-7 UndirectedSpanningForest</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X79C770918610AD97">3.3-8 DigraphShortestPathSpanningTree</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D1D26D27F5B56C2">3.3-9 QuotientDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X78DECD26811EFD7C">3.3-10 DigraphReverse</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7F71D99D852B130F">3.3-11 DigraphDual</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X874883DD7DD450C4">3.3-12 DigraphSymmetricClosure</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7A6C419080AD41DE">3.3-13 DigraphTransitiveClosure</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X82AD17517E273600">3.3-14 DigraphTransitiveReduction</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X83B2506D79453208">3.3-15 DigraphAddVertex</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8134BEE7786BD3A7">3.3-16 DigraphAddVertices</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7E58CC4880627658">3.3-17 DigraphAddEdge</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7BE5C7028760B053">3.3-18 DigraphAddEdgeOrbit</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8693A61B7F752C76">3.3-19 DigraphAddEdges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B634A2B83C08B16">3.3-20 DigraphRemoveVertex</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7E290E847A5A299A">3.3-21 DigraphRemoveVertices</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8433E3BC7E5EA6BF">3.3-22 DigraphRemoveEdge</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X85981D9187F49018">3.3-23 DigraphRemoveEdgeOrbit</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X87093FDA7F88E732">3.3-24 DigraphRemoveEdges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X79324AF7818C0C02">3.3-25 DigraphRemoveLoops</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DCCD0247897A3DE">3.3-26 DigraphRemoveAllMultipleEdges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X792AD1147E2BFCB7">3.3-27 DigraphContractEdge</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7821753D85402A8C">3.3-28 DigraphReverseEdges</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X814F1DFC83DB273F">3.3-29 DigraphDisjointUnion</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DA997697D310E44">3.3-30 DigraphEdgeUnion</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DDFC759860E3390">3.3-31 DigraphJoin</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D625CC87DBFFDED">3.3-32 DigraphCartesianProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84D24DC9833B54A5">3.3-33 DigraphDirectProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8160BCC378AF000F">3.3-34 ConormalProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X79FD2AF279F20A72">3.3-35 HomomorphicProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8151176882BA9901">3.3-36 LexicographicProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X807F95057F9DF576">3.3-37 ModularProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X82E200F07FEFAF27">3.3-38 StrongProduct</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8795087A78FE7D54">3.3-39 DigraphCartesianProductProjections</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84FB64F185B804C2">3.3-40 DigraphDirectProductProjections</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8595BF937B749F22">3.3-41 LineDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8364C6F17A1680CB">3.3-42 LineUndirectedDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7FB8B48C87C0ED16">3.3-43 DoubleDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7C6E6CB284982C7A">3.3-44 BipartiteDoubleDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8167A50A83256ED1">3.3-45 DigraphAddAllLoops</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X865436437DF95FEF">3.3-46 DistanceDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X86F9CCEA839ABC48">3.3-47 DigraphClosure</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B5AC5FE859F4D80">3.3-48 DigraphMycielskian</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X85B5D9B97F5187B7">3.4 <span class="Heading">Random digraphs</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X86CF9F66788B2A24">3.4-1 RandomDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X78FE275E7E77D56F">3.4-2 RandomMultiDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D36B5E57F055051">3.4-3 RandomTournament</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7A023E4787682475">3.4-4 RandomLattice</a></span>
</div></div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chap3.html#X7C76D1DC7DAF03D3">3.5 <span class="Heading">Standard examples</span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7D5E3E337D03EDFF">3.5-1 AndrasfaiGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8636C2898395B7DF">3.5-2 BananaTree</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7FC309427BB170D8">3.5-3 BinaryTree</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X845C374280D6EAA4">3.5-4 BinomialTreeGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7E3240047C92733F">3.5-5 BishopsGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X81A0AC37816D287B">3.5-6 BondyGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X861F493382FA7C0B">3.5-7 BookGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8542287E81BDB55E">3.5-8 BurntPancakeGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84C1D3D67E3979A5">3.5-9 PancakeGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B5E9D857D47F5C2">3.5-10 StackedBookGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X870594FC866AC88E">3.5-11 ChainDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7DB5AB657A797CF2">3.5-12 CirculantGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X812417E278198D9C">3.5-13 CompleteDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8795B0AD856014FA">3.5-14 CompleteBipartiteDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X873F29CC863241F8">3.5-15 CompleteMultipartiteDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80C29DDE876FFBEB">3.5-16 CycleDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7F6EC0AE81531C3C">3.5-17 CycleGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80DAE31A79FEFD40">3.5-18 EmptyDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7CE45E2B782ADE9A">3.5-19 GearGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X795B62398767E313">3.5-20 HaarGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X801024F57DDC8A39">3.5-21 HalvedCubeGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7C43BDE47DF6553A">3.5-22 HanoiGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X782ABFCE812B020A">3.5-23 HelmGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7EE552F88609B1A2">3.5-24 HypercubeGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80ED9CE785819607">3.5-25 JohnsonDigraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X79483C677AF65688">3.5-26 KellerGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X80576A8C861512FD">3.5-27 KingsGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8655BA8584B3ACD0">3.5-28 KneserGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84609DCA79FD9B56">3.5-29 KnightsGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7F61140C822880DA">3.5-30 LindgrenSousselierGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X832E82CF87BF5D43">3.5-31 LollipopGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X853613228110588E">3.5-32 MobiusLadderGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X825943547FD7A687">3.5-33 MycielskiGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7904BB2982014ADA">3.5-34 OddGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X815055168405B7F0">3.5-35 PathGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7A38DFC47AAE4A96">3.5-36 PermutationStarGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X823F43217A6C375D">3.5-37 PetersenGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7B5441F386BD105E">3.5-38 GeneralisedPetersenGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X85425DC5847E6D20">3.5-39 PrismGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X817982877B48D5BD">3.5-40 StackedPrismGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X785C3F1F7D690151">3.5-41 QueensGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7A6DD11881874F51">3.5-42 RooksGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8404987F849D7CF2">3.5-43 SquareGridGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X8234361278E8816F">3.5-44 TriangularGridGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X78F78C077CBAE1EC">3.5-45 StarGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X81D59C4D809F4AD3">3.5-46 TadpoleGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7BFA33067F83F8B0">3.5-47 WalshHadamardGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X84F3B70A82EEE780">3.5-48 WebGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X817EA60D828A765E">3.5-49 WheelGraph</a></span>
<span class="ContSS"><br /><span class="nocss"> </span><a href="chap3.html#X7BE44CA27AA5F8DB">3.5-50 WindmillGraph</a></span>
</div></div>
</div>
<h3>3 <span class="Heading">Creating digraphs</span></h3>
<p>In this chapter we describe how to create digraphs.</p>
<p><a id="X7D34861E863A5D93" name="X7D34861E863A5D93"></a></p>
<h4>3.1 <span class="Heading">Creating digraphs</span></h4>
<p><a id="X7877ADC77F85E630" name="X7877ADC77F85E630"></a></p>
<h5>3.1-1 IsDigraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDigraph</code></td><td class="tdright">( category )</td></tr></table></div>
<p>Every digraph in <strong class="pkg">Digraphs</strong> belongs to the category <code class="code">IsDigraph</code>. Some basic attributes and operations for digraphs are <code class="func">DigraphVertices</code> (<a href="chap5.html#X7C45F7D878D896AC"><span class="RefLink">5.1-1</span></a>), <code class="func">DigraphEdges</code> (<a href="chap5.html#X7D1C6A4D7ECEC317"><span class="RefLink">5.1-3</span></a>), and <code class="func">OutNeighbours</code> (<a href="chap5.html#X7E9880767AE68E00"><span class="RefLink">5.2-6</span></a>).</p>
<p><a id="X7D7EDF83820ED6F5" name="X7D7EDF83820ED6F5"></a></p>
<h5>3.1-2 IsMutableDigraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsMutableDigraph</code></td><td class="tdright">( category )</td></tr></table></div>
<p><code class="code">IsMutableDigraph</code> is a synonym for <code class="func">IsDigraph</code> (<a href="chap3.html#X7877ADC77F85E630"><span class="RefLink">3.1-1</span></a>) and <code class="func">IsMutable</code> (<a href="/home/runner/gap/doc/ref/chap12.html#X7999AD1D7A4F1F46"><span class="RefLink">Reference: IsMutable</span></a>). A mutable digraph may be changed in-place by methods in the <strong class="pkg">Digraphs</strong> package, and is not attribute-storing – see <code class="func">IsAttributeStoringRep</code> (<a href="/home/runner/gap/doc/ref/chap13.html#X7A951C33839AF2C1"><span class="RefLink">Reference: IsAttributeStoringRep</span></a>).</p>
<p>A mutable digraph may be converted into an immutable attribute-storing digraph by calling <code class="func">MakeImmutable</code> (<a href="/home/runner/gap/doc/ref/chap12.html#X80CE136D804097C7"><span class="RefLink">Reference: MakeImmutable</span></a>) on the digraph.</p>
<p><a id="X7CAFAA89804F80BD" name="X7CAFAA89804F80BD"></a></p>
<h5>3.1-3 IsImmutableDigraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsImmutableDigraph</code></td><td class="tdright">( category )</td></tr></table></div>
<p><code class="code">IsImmutableDigraph</code> is a subcategory of <code class="func">IsDigraph</code> (<a href="chap3.html#X7877ADC77F85E630"><span class="RefLink">3.1-1</span></a>). Digraphs that lie in <code class="code">IsImmutableDigraph</code> are immutable and attribute-storing. In particular, they lie in <code class="func">IsAttributeStoringRep</code> (<a href="/home/runner/gap/doc/ref/chap13.html#X7A951C33839AF2C1"><span class="RefLink">Reference: IsAttributeStoringRep</span></a>).</p>
<p>A mutable digraph may be converted to an immutable digraph that lies in the category <code class="code">IsImmutableDigraph</code> by calling <code class="func">MakeImmutable</code> (<a href="/home/runner/gap/doc/ref/chap12.html#X80CE136D804097C7"><span class="RefLink">Reference: MakeImmutable</span></a>) on the digraph.</p>
<p>The operation <code class="func">DigraphMutableCopy</code> (<a href="chap3.html#X83D93A8A8251E6F9"><span class="RefLink">3.3-1</span></a>) can be used to construct a mutable copy of an immutable digraph. It is however not possible to convert an immutable digraph into a mutable digraph in-place.</p>
<p><a id="X7E749324800B38A5" name="X7E749324800B38A5"></a></p>
<h5>3.1-4 IsCayleyDigraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsCayleyDigraph</code></td><td class="tdright">( category )</td></tr></table></div>
<p><code class="code">IsCayleyDigraph</code> is a subcategory of <code class="code">IsDigraph</code>. Digraphs that are Cayley digraphs of a group and that are constructed by the operation <code class="func">CayleyDigraph</code> (<a href="chap3.html#X7FCADADC7EC28478"><span class="RefLink">3.1-12</span></a>) are constructed in this category, and are always immutable.</p>
<p><a id="X80F1B6D28478D8B9" name="X80F1B6D28478D8B9"></a></p>
<h5>3.1-5 IsDigraphWithAdjacencyFunction</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IsDigraphWithAdjacencyFunction</code></td><td class="tdright">( category )</td></tr></table></div>
<p><code class="code">IsDigraphWithAdjacencyFunction</code> is a subcategory of <code class="code">IsDigraph</code>. Digraphs that are <em>created</em> using an adjacency function are constructed in this category.</p>
<p><a id="X86E798B779515678" name="X86E798B779515678"></a></p>
<h5>3.1-6 DigraphByOutNeighboursType</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphByOutNeighboursType</code></td><td class="tdright">( global variable )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphFamily</code></td><td class="tdright">( family )</td></tr></table></div>
<p>The type of all digraphs is <code class="code">DigraphByOutNeighboursType</code>. The family of all digraphs is <code class="code">DigraphFamily</code>.</p>
<p><a id="X834843057CE86655" name="X834843057CE86655"></a></p>
<h5>3.1-7 Digraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Digraph</code>( [<var class="Arg">filt</var>, ]<var class="Arg">obj</var>[, <var class="Arg">source</var>, <var class="Arg">range</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Digraph</code>( [<var class="Arg">filt</var>, ]<var class="Arg">list</var>, <var class="Arg">func</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Digraph</code>( [<var class="Arg">filt</var>, ]<var class="Arg">G</var>, <var class="Arg">list</var>, <var class="Arg">act</var>, <var class="Arg">adj</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If the optional first argument <var class="Arg">filt</var> is present, then this should specify the category or representation the digraph being created will belong to. For example, if <var class="Arg">filt</var> is <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then the digraph being created will be mutable, if <var class="Arg">filt</var> is <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>), then the digraph will be immutable. If the optional first argument <var class="Arg">filt</var> is not present, then <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>) is used by default.</p>
<dl>
<dt><strong class="Mark">for a list (i.e. an adjacency list)</strong></dt>
<dd><p>if <var class="Arg">obj</var> is a list of lists of positive integers in the range from <code class="code">1</code> to <code class="code">Length(<var class="Arg">obj</var>)</code>, then this function returns the digraph with vertices <span class="SimpleMath">E ^ 0 =</span><code class="code">[1 .. Length(<var class="Arg">obj</var>)]</code>, and edges corresponding to the entries of <var class="Arg">obj</var>.</p>
<p>More precisely, there is an edge from vertex <code class="code">i</code> to <code class="code">j</code> if and only if <code class="code">j</code> is in <code class="code"><var class="Arg">obj</var>[i]</code>; the source of this edge is <code class="code">i</code> and the range is <code class="code">j</code>. If <code class="code">j</code> occurs in <code class="code"><var class="Arg">obj</var>[i]</code> with multiplicity <code class="code">k</code>, then there are <code class="code">k</code> edges from <code class="code">i</code> to <code class="code">j</code>.</p>
</dd>
<dt><strong class="Mark">for three lists</strong></dt>
<dd><p>if <var class="Arg">obj</var> is a duplicate-free list, and <var class="Arg">source</var> and <var class="Arg">range</var> are lists of equal length consisting of positive integers in the list <code class="code">[1 .. Length(<var class="Arg">obj</var>)]</code>, then this function returns a digraph with vertices <span class="SimpleMath">E ^ 0 =</span><code class="code">[1 .. Length(<var class="Arg">obj</var>)]</code>, and <code class="code">Length(<var class="Arg">source</var>)</code> edges. For each <code class="code">i</code> in <code class="code">[1 .. Length(<var class="Arg">source</var>)]</code> there exists an edge with source vertex <code class="code">source[i]</code> and range vertex <code class="code">range[i]</code>. See <code class="func">DigraphSource</code> (<a href="chap5.html#X7FDEBF3279759961"><span class="RefLink">5.2-5</span></a>) and <code class="func">DigraphRange</code> (<a href="chap5.html#X7FDEBF3279759961"><span class="RefLink">5.2-5</span></a>).</p>
<p>The vertices of the digraph will be labelled by the elements of <var class="Arg">obj</var>.</p>
</dd>
<dt><strong class="Mark">for an integer, and two lists</strong></dt>
<dd><p>if <var class="Arg">obj</var> is an integer, and <var class="Arg">source</var> and <var class="Arg">range</var> are lists of equal length consisting of positive integers in the list <code class="code">[1 .. <var class="Arg">obj</var>]</code>, then this function returns a digraph with vertices <span class="SimpleMath">E ^ 0 =</span><code class="code">[1 .. <var class="Arg">obj</var>]</code>, and <code class="code">Length(<var class="Arg">source</var>)</code> edges. For each <code class="code">i</code> in <code class="code">[1 .. Length(<var class="Arg">source</var>)]</code> there exists an edge with source vertex <code class="code">source[i]</code> and range vertex <code class="code">range[i]</code>. See <code class="func">DigraphSource</code> (<a href="chap5.html#X7FDEBF3279759961"><span class="RefLink">5.2-5</span></a>) and <code class="func">DigraphRange</code> (<a href="chap5.html#X7FDEBF3279759961"><span class="RefLink">5.2-5</span></a>).</p>
</dd>
<dt><strong class="Mark">for a list and a function</strong></dt>
<dd><p>if <var class="Arg">list</var> is a list and <var class="Arg">func</var> is a function taking 2 arguments that are elements of <var class="Arg">list</var>, and <var class="Arg">func</var> returns <code class="keyw">true</code> or <code class="keyw">false</code>, then this operation creates a digraph with vertices <code class="code">[1 .. Length(<var class="Arg">list</var>)]</code> and an edge from vertex <code class="code">i</code> to vertex <code class="code">j</code> if and only if <code class="code"><var class="Arg">func</var>(<var class="Arg">list</var>[i], <var class="Arg">list</var>[j])</code> returns <code class="keyw">true</code>.</p>
</dd>
<dt><strong class="Mark">for a group, a list, and two functions</strong></dt>
<dd><p>The arguments will be <var class="Arg">G, list, act, adj</var>.</p>
<p>Let <var class="Arg">G</var> be a group acting on the objects in <var class="Arg">list</var> via the action <var class="Arg">act</var>, and let <var class="Arg">adj</var> be a function taking two objects from <var class="Arg">list</var> as arguments and returning <code class="code">true</code> or <code class="code">false</code>. The function <var class="Arg">adj</var> will describe the adjacency between objects from <var class="Arg">list</var>, which is invariant under the action of <var class="Arg">G</var>. This variant of the constructor returns a digraph with vertices the objects of <var class="Arg">list</var> and directed edges <code class="code">[x, y]</code> when <code class="code">f(x, y)</code> is <code class="code">true</code>.</p>
<p>The action of the group <var class="Arg">G</var> on the objects in <var class="Arg">list</var> is stored in the attribute <code class="func">DigraphGroup</code> (<a href="chap7.html#X803ACEDA7BBAC5B3"><span class="RefLink">7.2-10</span></a>), and is used to speed up operations like <code class="func">DigraphDiameter</code> (<a href="chap5.html#X7F16B9EB8398459C"><span class="RefLink">5.4-1</span></a>).</p>
</dd>
<dt><strong class="Mark">for a Grape package graph</strong></dt>
<dd><p>if <var class="Arg">obj</var> is a <span class="URL"><a href="https://gap-packages.github.io/grape">GRAPE</a></span> package graph (i.e. a record for which the function <code class="code">IsGraph</code> returns <code class="keyw">true</code>), then this function returns a digraph isomorphic to <var class="Arg">obj</var>.</p>
</dd>
<dt><strong class="Mark">for a binary relation</strong></dt>
<dd><p>if <var class="Arg">obj</var> is a binary relation on the points <code class="code">[1 .. n]</code> for some positive integer <span class="SimpleMath">n</span>, then this function returns the digraph defined by <var class="Arg">obj</var>. Specifically, this function returns a digraph which has <span class="SimpleMath">n</span> vertices, and which has an edge with source <code class="code">i</code> and range <code class="code">j</code> if and only if <code class="code">[i,j]</code> is a pair in the binary relation <var class="Arg">obj</var>.</p>
</dd>
<dt><strong class="Mark">for a string naming a digraph</strong></dt>
<dd><p>if <var class="Arg">obj</var> is a non-empty string, then this function returns the digraph that has name <var class="Arg">obj</var>. <strong class="pkg">Digraphs</strong> comes with a database containing a few hundred common digraph names that can be loaded in this way. Valid names include <code class="code">"folkman"</code>, <code class="code">"diamond"</code> and <code class="code">"brinkmann"</code>. If the name is commonly followed by the word <code class="code">"graph"</code>, then it is called without writing <code class="code">"graph"</code> at the end. You can explore the available graph names using <code class="func">ListNamedDigraphs</code> (<a href="chap3.html#X7BB820C9813F035F"><span class="RefLink">3.1-13</span></a>). Digraph names are case and whitespace insensitive.</p>
<p>Note that any undirected graphs in the database are stored as symmetric digraphs, so the resulting digraph will have twice as many edges as its undirected counterpart.</p>
</dd>
</dl>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">gr := Digraph([</span>
<span class="GAPprompt">></span> <span class="GAPinput">[2, 5, 8, 10], [2, 3, 4, 2, 5, 6, 8, 9, 10], [1],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[3, 5, 7, 8, 10], [2, 5, 7], [3, 6, 7, 9, 10], [1, 4],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[1, 5, 9], [1, 2, 7, 8], [3, 5]]);</span>
<immutable multidigraph with 10 vertices, 38 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">gr := Digraph(["a", "b", "c"], ["a"], ["b"]);</span>
<immutable digraph with 3 vertices, 1 edge>
<span class="GAPprompt">gap></span> <span class="GAPinput">gr := Digraph(5, [1, 2, 2, 4, 1, 1], [2, 3, 5, 5, 1, 1]);</span>
<immutable multidigraph with 5 vertices, 6 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">Petersen := Graph(SymmetricGroup(5), [[1, 2]], OnSets,</span>
<span class="GAPprompt">></span> <span class="GAPinput">function(x, y) return Intersection(x, y) = []; end);;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">Digraph(Petersen);</span>
<immutable digraph with 10 vertices, 30 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">gr := Digraph([1 .. 10], ReturnTrue);</span>
<immutable digraph with 10 vertices, 100 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">Digraph("Diamond");</span>
<immutable digraph with 4 vertices, 10 edges></pre></div>
<p>The next example illustrates the uses of the fourth and fifth variants of this constructor. The resulting digraph is a strongly regular graph, and it is actually the point graph of the van Lint-Schrijver partial geometry, <a href="chapBib.html#biBvLS81">[vLS81]</a>. The algebraic description is taken from the seminal paper of Calderbank and Kantor <a href="chapBib.html#biBCK86">[CK86]</a>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">f := GF(3 ^ 4);</span>
GF(3^4)
<span class="GAPprompt">gap></span> <span class="GAPinput">gamma := First(f, x -> Order(x) = 5);</span>
Z(3^4)^64
<span class="GAPprompt">gap></span> <span class="GAPinput">L := Union([Zero(f)], List(Group(gamma)));</span>
[ 0*Z(3), Z(3)^0, Z(3^4)^16, Z(3^4)^32, Z(3^4)^48, Z(3^4)^64 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">omega := Union(List(L, x -> List(Difference(L, [x]), y -> x - y)));</span>
[ Z(3)^0, Z(3), Z(3^4)^5, Z(3^4)^7, Z(3^4)^8, Z(3^4)^13, Z(3^4)^15,
Z(3^4)^16, Z(3^4)^21, Z(3^4)^23, Z(3^4)^24, Z(3^4)^29, Z(3^4)^31,
Z(3^4)^32, Z(3^4)^37, Z(3^4)^39, Z(3^4)^45, Z(3^4)^47, Z(3^4)^48,
Z(3^4)^53, Z(3^4)^55, Z(3^4)^56, Z(3^4)^61, Z(3^4)^63, Z(3^4)^64,
Z(3^4)^69, Z(3^4)^71, Z(3^4)^72, Z(3^4)^77, Z(3^4)^79 ]
<span class="GAPprompt">gap></span> <span class="GAPinput">adj := function(x, y)</span>
<span class="GAPprompt">></span> <span class="GAPinput"> return x - y in omega;</span>
<span class="GAPprompt">></span> <span class="GAPinput">end;</span>
function( x, y ) ... end
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph := Digraph(AsList(f), adj);</span>
<immutable digraph with 81 vertices, 2430 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">group := Group(Z(3));;</span>
<span class="GAPprompt">gap></span> <span class="GAPinput">act := \*;</span>
<Operation "*">
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph := Digraph(group, List(f), act, adj);</span>
<immutable digraph with 81 vertices, 2430 edges>
</pre></div>
<p><a id="X8023FE387A3AB609" name="X8023FE387A3AB609"></a></p>
<h5>3.1-8 DigraphByAdjacencyMatrix</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphByAdjacencyMatrix</code>( [<var class="Arg">filt</var>, ]<var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If the optional first argument <var class="Arg">filt</var> is present, then this should specify the category or representation the digraph being created will belong to. For example, if <var class="Arg">filt</var> is <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then the digraph being created will be mutable, if <var class="Arg">filt</var> is <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>), then the digraph will be immutable. If the optional first argument <var class="Arg">filt</var> is not present, then <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>) is used by default.</p>
<p>If <var class="Arg">list</var> is the adjacency matrix of a digraph in the sense of <code class="func">AdjacencyMatrix</code> (<a href="chap5.html#X7DC2CD70830BEE60"><span class="RefLink">5.2-1</span></a>), then this operation returns the digraph which is defined by <var class="Arg">list</var>.</p>
<p>Alternatively, if <var class="Arg">list</var> is a square boolean matrix, then this operation returns the digraph with <code class="code">Length(</code><var class="Arg">list</var><code class="code">)</code> vertices which has the edge <code class="code">[i,j]</code> if and only if <var class="Arg">list</var><code class="code">[i][j]</code> is <code class="keyw">true</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DigraphByAdjacencyMatrix([</span>
<span class="GAPprompt">></span> <span class="GAPinput">[0, 1, 0, 2, 0],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[1, 1, 1, 0, 1],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[0, 3, 2, 1, 1],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[0, 0, 1, 0, 1],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[2, 0, 0, 0, 0]]);</span>
<immutable multidigraph with 5 vertices, 18 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">D := DigraphByAdjacencyMatrix([</span>
<span class="GAPprompt">></span> <span class="GAPinput">[true, false, true],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[false, false, true],</span>
<span class="GAPprompt">></span> <span class="GAPinput">[false, true, false]]);</span>
<immutable digraph with 3 vertices, 4 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">OutNeighbours(D);</span>
[ [ 1, 3 ], [ 3 ], [ 2 ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">D := DigraphByAdjacencyMatrix(IsMutableDigraph, </span>
<span class="GAPprompt">></span> <span class="GAPinput">[[true, false, true],</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [false, false, true],</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [false, true, false]]);</span>
<mutable digraph with 3 vertices, 4 edges>
</pre></div>
<p><a id="X7F37B6768349E269" name="X7F37B6768349E269"></a></p>
<h5>3.1-9 DigraphByEdges</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphByEdges</code>( [<var class="Arg">filt</var>, ]<var class="Arg">list</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If the optional first argument <var class="Arg">filt</var> is present, then this should specify the category or representation the digraph being created will belong to. For example, if <var class="Arg">filt</var> is <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then the digraph being created will be mutable, if <var class="Arg">filt</var> is <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>), then the digraph will be immutable. If the optional first argument <var class="Arg">filt</var> is not present, then <code class="func">IsImmutableDigraph</code> (<a href="chap3.html#X7CAFAA89804F80BD"><span class="RefLink">3.1-3</span></a>) is used by default.</p>
<p>If <var class="Arg">list</var> is list of pairs of positive integers, then this function returns the digraph with the minimum number of vertices <code class="code">m</code> such that its list equal <var class="Arg">list</var>.</p>
<p>If the optional second argument <var class="Arg">n</var> is a positive integer with <code class="code"><var class="Arg">n</var> >= m</code> (with <code class="code">m</code> defined as above), then this function returns the digraph with <var class="Arg">n</var> vertices and list <var class="Arg">list</var>.</p>
<p>See <code class="func">DigraphEdges</code> (<a href="chap5.html#X7D1C6A4D7ECEC317"><span class="RefLink">5.1-3</span></a>).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">DigraphByEdges(</span>
<span class="GAPprompt">></span> <span class="GAPinput">[[1, 3], [2, 1], [2, 3], [2, 5], [3, 6],</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [4, 6], [5, 2], [5, 4], [5, 6], [6, 6]]);</span>
<immutable digraph with 6 vertices, 10 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">DigraphByEdges(</span>
<span class="GAPprompt">></span> <span class="GAPinput">[[1, 3], [2, 1], [2, 3], [2, 5], [3, 6],</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [4, 6], [5, 2], [5, 4], [5, 6], [6, 6]], 12);</span>
<immutable digraph with 12 vertices, 10 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">DigraphByEdges(IsMutableDigraph, </span>
<span class="GAPprompt">></span> <span class="GAPinput">[[1, 3], [2, 1], [2, 3], [2, 5], [3, 6],</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [4, 6], [5, 2], [5, 4], [5, 6], [6, 6]], 12);</span>
<mutable digraph with 12 vertices, 10 edges>
</pre></div>
<p><a id="X7B75C1D680757D6F" name="X7B75C1D680757D6F"></a></p>
<h5>3.1-10 EdgeOrbitsDigraph</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ EdgeOrbitsDigraph</code>( <var class="Arg">G</var>, <var class="Arg">edges</var>[, <var class="Arg">n</var>] )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: An immutable digraph.</p>
<p>If <var class="Arg">G</var> is a permutation group, <var class="Arg">edges</var> is an edge or list of edges, and <var class="Arg">n</var> is a non-negative integer such that <var class="Arg">G</var> fixes <code class="code">[1 .. <var class="Arg">n</var>]</code> setwise, then this operation returns an immutable digraph with <var class="Arg">n</var> vertices and the union of the orbits of the edges in <var class="Arg"> edges </var> under the action of the permutation group <var class="Arg">G</var>. An edge in this context is simply a pair of positive integers.</p>
<p>If the optional third argument <var class="Arg">n</var> is not present, then the largest moved point of the permutation group <var class="Arg">G</var> is used by default.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">digraph := EdgeOrbitsDigraph(Group((1, 3), (1, 2)(3, 4)),</span>
<span class="GAPprompt">></span> <span class="GAPinput"> [[1, 2], [4, 5]], 5);</span>
<immutable digraph with 5 vertices, 12 edges>
<span class="GAPprompt">gap></span> <span class="GAPinput">OutNeighbours(digraph);</span>
[ [ 2, 4, 5 ], [ 1, 3, 5 ], [ 2, 4, 5 ], [ 1, 3, 5 ], [ ] ]
<span class="GAPprompt">gap></span> <span class="GAPinput">RepresentativeOutNeighbours(digraph);</span>
[ [ 2, 4, 5 ], [ ] ]
</pre></div>
<p><a id="X81BC49B57EAADEFB" name="X81BC49B57EAADEFB"></a></p>
<h5>3.1-11 DigraphByInNeighbours</h5>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphByInNeighbours</code>( [<var class="Arg">filt</var>, ]<var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DigraphByInNeighbors</code>( [<var class="Arg">filt</var>, ]<var class="Arg">list</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p>Returns: A digraph.</p>
<p>If the optional first argument <var class="Arg">filt</var> is present, then this should specify the category or representation the digraph being created will belong to. For example, if <var class="Arg">filt</var> is <code class="func">IsMutableDigraph</code> (<a href="chap3.html#X7D7EDF83820ED6F5"><span class="RefLink">3.1-2</span></a>), then the digraph being created will be mutable, if <var class="Arg">filt</var> is <code class="func">IsImmutableDigraph</code> (<a href="chap3 | |