We provide several functions to translate graphs, Hasse diagrams or trees related to numerical and affine semigroups to the dot language. This can either be used with graphviz or any javascript library that interprets dot language. We give the alternative to use <C>DotSplash</C> that uses viz.js.
<ManSection>
<Func Name="DotBinaryRelation" Arg="br"/>
<Description>
<C>br</C> is a binary relation. Returns a GraphViz dot that represents the binary relation <C>br</C>. The set of vertices of the resulting graph is the source of <C>br</C>. Edges join those elements which are related with respect to <C>br</C>.
<Example><![CDATA[
gap> br:=BinaryRelationByElements(Domain([1,2]), [DirectProductElement([1,2])]);
<general mapping: <object> -> <object> >
gap> Print(DotBinaryRelation(br));
digraph NSGraph{rankdir = TB; edge[dir=back];
1 [label="1"];
2 [label="2"];
2 -> 1;
}
]]></Example>
</Description>
</ManSection>
<ManSection>
<Func Name="HasseDiagramOfNumericalSemigroup" Arg="S, A"/>
<Description>
<C>S</C> is a numerical semigroup and <C>A</C> is a set of integers. Returns a binary relation which is the Hasse diagram of <C>A</C> with respect to the ordering <M>a\preceq b</M> if <M>b - a</M> in <C>S</C>.
<Example><![CDATA[
gap> s:=NumericalSemigroup(3,5,7);;
gap> HasseDiagramOfNumericalSemigroup(s,[1,2,3]);
<general mapping: <object> -> <object> >
]]></Example>
</Description>
</ManSection>
<ManSection>
<Func Name="HasseDiagramOfBettiElementsOfNumericalSemigroup" Arg="S"/>
<Description>
<C>S</C> is a numerical semigroup. Applies <Ref Func="HasseDiagramOfBettiElementsOfNumericalSemigroup"/> with arguments <C>S</C> and its Betti elements.
<Example><![CDATA[
gap> s:=NumericalSemigroup(3,5,7);;
gap> HasseDiagramOfBettiElementsOfNumericalSemigroup(s);
<general mapping: <object> -> <object> >
]]></Example>
</Description>
</ManSection>
<ManSection>
<Func Name="HasseDiagramOfAperyListOfNumericalSemigroup" Arg="S, [n]"/>
<Description>
<C>S</C> is a numerical semigroup, <C>n</C> is an integer (optional, if not provided, the multiplicity of the semigroup is taken as its value). Applies <Ref Func="HasseDiagramOfBettiElementsOfNumericalSemigroup"/> with arguments <C>S</C> and the Apéry set of <C>S</C> with respect to <C>n</C>.
<Example><![CDATA[
gap> s:=NumericalSemigroup(3,5,7);;
gap> HasseDiagramOfAperyListOfNumericalSemigroup(s);
<general mapping: <object> -> <object> >
gap> HasseDiagramOfAperyListOfNumericalSemigroup(s,10);
<general mapping: <object> -> <object> >
]]></Example>
</Description>
</ManSection>
<ManSection>
<Oper Name="DotRosalesGraph" Arg="n, S" Label="for affine semigroup"/>
<Oper Name="DotRosalesGraph" Arg="n, S" Label="for numerical semigroup"/>
<Description>
<C>S</C> is either numerical or an affine semigroup and <C>n</C> is an element in <C>S</C>. It outputs the graph associated to <C>n</C> in <C>S</C> (see <Ref Func="GraphAssociatedToElementInNumericalSemigroup"/>).
<Example><![CDATA[
gap> s:=NumericalSemigroup(4,6,9);;
gap> Print(DotRosalesGraph(15,s));
graph NSGraph{
1 [label="6"];
2 [label="9"];
2 -- 1;
}
]]></Example>
</Description>
</ManSection>
<ManSection>
<Oper Name="DotFactorizationGraph" Arg="f"/>
<Description>
<C>f</C> is a set of factorizations.
Returns the graph (in dot) of factorizations associated to <C>f</C>: a complete graph whose vertices are the elements of <C>f</C>. Edges are labelled with distances between the nodes they join. Kruskal algorithm is used to draw in red a spanning tree with minimal distances. Thus the catenary degree is reached in the edges of the tree.
<ManSection>
<Oper Name="DotEliahouGraph" Arg="f"/>
<Description>
<C>f</C> is a set of factorizations.
Returns the Eliahou graph (in dot) of factorizations associated to <C>f</C>: a graph whose vertices are the elements of <C>f</C>, and there is an edge between two vertices if they have common support. Edges are labelled with distances between nodes they join.
<Example><![CDATA[
gap> f:=FactorizationsIntegerWRTList(20,[3,5,7]);
[ [ 5, 1, 0 ], [ 0, 4, 0 ], [ 1, 2, 1 ], [ 2, 0, 2 ] ]
gap> Print(DotEliahouGraph(f));
graph NSGraph{
1 [label=" (5, 1, 0)"];
2 [label=" (0, 4, 0)"];
3 [label=" (1, 2, 1)"];
4 [label=" (2, 0, 2)"];
2 -- 3[label="2" ];
3 -- 4[label="2" ];
1 -- 3[label="4" ];
1 -- 4[label="4" ];
1 -- 2[label="5" ];
}
]]></Example>
</Description>
</ManSection>
<ManSection>
<Func Name="SetDotNSEngine" Arg="engine"/>
<Description>
This function sets the value of <C>DotNSEngine</C> to <C>engine</C>, which must be any of the following "circo","dot","fdp","neato","osage","twopi". This tells viz.js which graphviz engine to use.
<Example><![CDATA[
gap> SetDotNSEngine("circo");
true
]]></Example>
Here is an example with the default dot engine
<Alt Only="LaTeX">
\begin{center}
\includegraphics[height=4cm]{img/fact-dot.pdf}
\end{center}
</Alt>
<Alt Only="HTML">
<br><center><img src="img/fact-dot.jpg"></center><br>
</Alt>
And one with circo engine
<Alt Only="LaTeX">
\begin{center}
\includegraphics[height=4cm]{img/fact-circo.pdf}
\end{center}
</Alt>
<Alt Only="HTML">
<br><center><img src="img/fact-circo.jpg"></center><br>
</Alt>
</Description>
</ManSection>
<ManSection>
<Func Name="DotSplash" Arg="dots..."/>
<Description>
Launches a browser and visualizes the dots diagrams provided as arguments. It outputs the htmlpage displayed as a string, and prints the location of the temporary file that contains it.
</Description>
</ManSection>
</Section>
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.