1############################################################################# 2## 3#W dot.gd Manuel Delgado <mdelgado@fc.up.pt> 4#W Pedro A. Garcia-Sanchez <pedro@ugr.es> 5#W Andrés Herrera-Poyatos <andreshp9@gmail.com> 6## 7## 8#Y Copyright 2018 by Manuel Delgado and Pedro Garcia-Sanchez 9#Y We adopt the copyright regulations of GAP as detailed in the 10#Y copyright notice in the GAP manual. 11## 12############################################################################# 13 14############################################################################ 15## 16#F DotSplash(dots...) 17## Launches a browser and visualizes the dots diagrams 18## provided as arguments. 19## 20############################################################################ 21DeclareGlobalFunction("DotSplash"); 22 23############################################################################ 24## 25#F DotBinaryRelation(br) 26## Returns a GraphViz dot which represents the binary relation br. 27## The set of vertices of the resulting graph is the source of br. 28## Edges join those elements which are related in br. 29## 30############################################################################ 31DeclareGlobalFunction("DotBinaryRelation"); 32 33############################################################################ 34## 35#F HasseDiagramOfNumericalSemigroup(s, A) 36## Returns a binary relation which is the Hasse diagram of A with 37## respect to the ordering a <= b if b - a in S. 38## 39############################################################################ 40DeclareGlobalFunction("HasseDiagramOfNumericalSemigroup"); 41 42############################################################################ 43## 44#F HasseDiagramOfBettiElementsOfNumericalSemigroup(s) 45## Returns a binary relation which is the Hasse diagram of the Betti 46## elements of s with respect to the ordering a <= b if b - a in S. 47## 48############################################################################ 49DeclareGlobalFunction("HasseDiagramOfBettiElementsOfNumericalSemigroup"); 50 51############################################################################ 52## 53#F HasseDiagramOfAperyListOfNumericalSemigroup(s, n) 54## Returns a binary relation which is the Hasse diagram of the 55## set Ap(s; n) with respect to the ordering a <= b if b - a in S. 56## The argument n is optional and its default value is the multiplicity 57## of s. 58## 59############################################################################ 60DeclareGlobalFunction("HasseDiagramOfAperyListOfNumericalSemigroup"); 61 62############################################################################ 63## 64#F DotTreeOfGluingsOfNumericalSemigroup(s, depth...) 65## Returns a GraphViz dot that represents the tree of gluings of the 66## numerical semigroup s. 67## The tree is truncated at the given depth. If the depth is not provided, 68## then the tree is fully built. 69## 70############################################################################ 71DeclareGlobalFunction("DotTreeOfGluingsOfNumericalSemigroup"); 72 73############################################################################ 74## 75#F DotOverSemigroupsNumericalSemigroup(s) 76## Returns a GraphViz dot that represents the Hasse diagram of 77## oversemigroupstree of the numerical semigroup s. 78## Irreducible numerical semigroups are highlighted. 79## 80############################################################################ 81DeclareGlobalFunction("DotOverSemigroupsNumericalSemigroup"); 82DeclareOperation("DotOverSemigroups", [IsNumericalSemigroup]); 83 84############################################################################ 85## 86#O DotRosalesGraph(n,s) 87## s is either a numerical semigroup or an affine semigroup, and n is an 88## element of s 89## returns the graph associated to n in s in dot. 90## 91############################################################################# 92DeclareOperation("DotRosalesGraph",[IsHomogeneousList,IsAffineSemigroup]); 93DeclareOperation("DotRosalesGraph",[IsInt,IsNumericalSemigroup]); 94 95############################################################################ 96## 97#O DotFactorizationGraph(f) 98## 99## f is a set of factorizations 100## returns the graph of factorizations associated to f: a complete graph 101## whose vertices are the elements of f. Edges are labelled with 102## distances between nodes they join. Kruskal algorithm is used to 103## draw in red a spannin tree with minimal distances. Thus the catenary 104## degree is reached in the edges of the tree. 105## 106############################################################################# 107DeclareOperation("DotFactorizationGraph",[IsRectangularTable]); 108 109############################################################################ 110## 111#O DotEliahouGraph(f) 112## 113## f is a set of factorizations 114## returns the Eliahou graph of factorizations associated to f: a graph 115## whose vertices are the elements of f, and there is an edge between 116## two vertices if they have common support. Edges are labelled with 117## distances between nodes they join. 118## 119############################################################################# 120DeclareOperation("DotEliahouGraph",[IsRectangularTable]); 121 122############################################################################ 123## 124#V DotNSEngine 125## 126## This variable stores the engine vizjs will use 127## 128############################################################################ 129BindGlobal("DotNSEngine", "dot"); 130 131############################################################################ 132## 133#F SetDotNSEngine(engine) 134## 135## This sets de value of DotNSEngine to engine, which must be any of 136## the following "circo","dot","fdp","neato","osage","twopi". 137## 138############################################################################ 139DeclareGlobalFunction("SetDotNSEngine");