diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex | 179 |
1 files changed, 176 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex index 1dbcc0fa0bf..4d2773c0d1e 100644 --- a/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex +++ b/Master/texmf-dist/doc/latex/adigraph/adigraph_documentation.tex @@ -637,7 +637,64 @@ This works only when you don't have a node called \textit{<+>}. When this happen \subsection{Combining Kleene operations} Sadly, operations such as \textit{<*,+>} or \textit{<+,+>} are not currently supported and not for lack of trying. I'll try implementing them again in the future when I'll have more time. -\section{Augmenting paths} +\section{Paths} +A path is specified by the following syntax: \textit{<comma separated list of nodes>}. + +\NewAdigraph{myPathsTestAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} + +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} +\myAdigraph{ + s,3,4,2,t; +} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \myPathsTestAdigraph{ + s,3,4,2,t; + } + \end{subfigure} +\end{figure} + +\subsection{Augmenting paths} An augmenting path is specified by the following syntax: \textit{<comma separated list of nodes:units>}. It is \textbf{very important} to note that incremental paths called upon the same object are memorized by default. \NewAdigraph{myAdigraph}{ @@ -771,8 +828,123 @@ For example, suppose now we'd like to send another 5 units on the graph edited b \end{subfigure} \end{figure} -\section{Cuts} +\subsection{Custom colored augmenting Paths} +A path is specified by the following syntax: \textit{<comma separated list of nodes>:<units>:<forward path color, backward path color>}. + +\NewAdigraph{myCustomAugmentingPathAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} + +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} +\myAdigraph{ + s,3,4,2,t:5:green,blue; +} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \myCustomAugmentingPathAdigraph{ + s,3,4,2,t:5:green,blue; + } + \end{subfigure} +\end{figure} +\subsection{Custom colored Paths} +A path is specified by the following syntax: \textit{<comma separated list of nodes>::<forward path color, backward path color>}. \textbf{Note the double colons!}. + +\NewAdigraph{myCustomPathAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} + +\begin{figure} + \begin{subfigure}{0.49\textwidth} + \begin{minted}{latex} +\NewAdigraph{myAdigraph}{ + s:0,0; + 1:2,2; + 3:2,-2; + 2:6,2; + 4:6,-2; + t:8,0; +}{ + s,1:25; + s,3:25; + 3,4:25; + 1,2:35; + 2,t:20; + 4,t:30; + 3,1:10; + 4,2:10; + 2,3:15::near start; + 4,1:5::near start; +} +\myAdigraph{ + s,3,4,2,t::green; + s,1,2::red; +} +\end{minted} + \end{subfigure} + \begin{subfigure}{0.49\textwidth} + \myCustomPathAdigraph{ + s,1,2::red; + s,3,4,2,t::green; + } + \end{subfigure} +\end{figure} + +\section{Cuts} The following is to add cuts to show minimum cuts for example, the syntax is: \textit{<first node, second node;>} \begin{figure} @@ -793,7 +965,7 @@ The following is to add cuts to show minimum cuts for example, the syntax is: \t \end{figure} \subsection{Colored cuts} -If you'd like to color the cuts you just have to add the color as follows: \textit{<first node, second node, color;>} +If you'd like to color the cuts you just have to add the color as follows: \textit{<first node, second node, color;>}. \textbf{Note that if you want to only add a cut and not an augmenting path and a cut, you still need to add the empty curly braces \{\}.} \begin{figure} \begin{subfigure}{0.49\textwidth} @@ -801,6 +973,7 @@ If you'd like to color the cuts you just have to add the color as follows: \text \myAdigraph{}{ 3,4,red; 2,t,blue; + 2,4,green; } \end{minted} \end{subfigure} |