\section{lib/dotgen/fastgr.c File Reference}
\label{fastgr_8c}\index{lib/dotgen/fastgr.\-c@{lib/dotgen/fastgr.\-c}}
{\ttfamily \#include \char`\"{}dot.\-h\char`\"{}}\\*
Include dependency graph for fastgr.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{fastgr_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf edge\-\_\-t} $\ast$ {\bf find\-\_\-fast\-\_\-edge} ({\bf node\-\_\-t} $\ast$u, {\bf node\-\_\-t} $\ast$v)
\item 
{\bf edge\-\_\-t} $\ast$ {\bf find\-\_\-flat\-\_\-edge} ({\bf node\-\_\-t} $\ast$u, {\bf node\-\_\-t} $\ast$v)
\item 
{\bf edge\-\_\-t} $\ast$ {\bf fast\-\_\-edge} ({\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf zapinlist} ({\bf elist} $\ast$L, {\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf delete\-\_\-fast\-\_\-edge} ({\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf other\-\_\-edge} ({\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf safe\-\_\-other\-\_\-edge} ({\bf edge\-\_\-t} $\ast$e)
\item 
{\bf edge\-\_\-t} $\ast$ {\bf new\-\_\-virtual\-\_\-edge} ({\bf node\-\_\-t} $\ast$u, {\bf node\-\_\-t} $\ast$v, {\bf edge\-\_\-t} $\ast$orig)
\item 
{\bf edge\-\_\-t} $\ast$ {\bf virtual\-\_\-edge} ({\bf node\-\_\-t} $\ast$u, {\bf node\-\_\-t} $\ast$v, {\bf edge\-\_\-t} $\ast$orig)
\item 
void {\bf fast\-\_\-node} ({\bf graph\-\_\-t} $\ast$g, {\bf Agnode\-\_\-t} $\ast$n)
\item 
void {\bf fast\-\_\-nodeapp} ({\bf node\-\_\-t} $\ast$u, {\bf node\-\_\-t} $\ast$v)
\item 
void {\bf delete\-\_\-fast\-\_\-node} ({\bf graph\-\_\-t} $\ast$g, {\bf node\-\_\-t} $\ast$n)
\item 
{\bf node\-\_\-t} $\ast$ {\bf virtual\-\_\-node} ({\bf graph\-\_\-t} $\ast$g)
\item 
void {\bf flat\-\_\-edge} ({\bf graph\-\_\-t} $\ast$g, {\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf delete\-\_\-flat\-\_\-edge} ({\bf edge\-\_\-t} $\ast$e)
\item 
void {\bf merge\-\_\-oneway} ({\bf edge\-\_\-t} $\ast$e, {\bf edge\-\_\-t} $\ast$rep)
\item 
void {\bf unmerge\-\_\-oneway} ({\bf edge\-\_\-t} $\ast$e)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\index{fastgr.\-c@{fastgr.\-c}!delete\-\_\-fast\-\_\-edge@{delete\-\_\-fast\-\_\-edge}}
\index{delete\-\_\-fast\-\_\-edge@{delete\-\_\-fast\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{delete\-\_\-fast\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}void delete\-\_\-fast\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a2735447e4c6324a32f006fa1f99ed309}


Definition at line 115 of file fastgr.\-c.



References aghead(), agtail(), assert, N\-D\-\_\-in, N\-D\-\_\-out, N\-U\-L\-L, and zapinlist().



Referenced by reverse\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!delete\-\_\-fast\-\_\-node@{delete\-\_\-fast\-\_\-node}}
\index{delete\-\_\-fast\-\_\-node@{delete\-\_\-fast\-\_\-node}!fastgr.c@{fastgr.\-c}}
\subsubsection[{delete\-\_\-fast\-\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}void delete\-\_\-fast\-\_\-node (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g, }
\item[{{\bf node\-\_\-t} $\ast$}]{n}
\end{DoxyParamCaption}
)}\label{fastgr_8c_aed9c3e3833f0b80bc1ed212a1ad39132}


Definition at line 229 of file fastgr.\-c.



References assert, G\-D\-\_\-nlist, N\-D\-\_\-next, and N\-D\-\_\-prev.

\index{fastgr.\-c@{fastgr.\-c}!delete\-\_\-flat\-\_\-edge@{delete\-\_\-flat\-\_\-edge}}
\index{delete\-\_\-flat\-\_\-edge@{delete\-\_\-flat\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{delete\-\_\-flat\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}void delete\-\_\-flat\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_acaa7d6db55cca9981a1d71b8d44496c1}


Definition at line 267 of file fastgr.\-c.



References aghead(), agtail(), assert, E\-D\-\_\-to\-\_\-orig, E\-D\-\_\-to\-\_\-virt, N\-D\-\_\-flat\-\_\-in, N\-D\-\_\-flat\-\_\-out, N\-U\-L\-L, and zapinlist().

\index{fastgr.\-c@{fastgr.\-c}!fast\-\_\-edge@{fast\-\_\-edge}}
\index{fast\-\_\-edge@{fast\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{fast\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\-\_\-t}$\ast$ fast\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_afb8b59721183f96d90885715ca95da27}


Definition at line 74 of file fastgr.\-c.



References aghead(), agtail(), assert, elist\-\_\-append, N\-D\-\_\-in, and N\-D\-\_\-out.



Referenced by make\-\_\-aux\-\_\-edge(), and virtual\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!fast\-\_\-node@{fast\-\_\-node}}
\index{fast\-\_\-node@{fast\-\_\-node}!fastgr.c@{fastgr.\-c}}
\subsubsection[{fast\-\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}void fast\-\_\-node (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g, }
\item[{{\bf Agnode\-\_\-t} $\ast$}]{n}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a786e0a17687da350d64652a972251ba5}


Definition at line 204 of file fastgr.\-c.



References assert, G\-D\-\_\-nlist, N\-D\-\_\-next, N\-D\-\_\-prev, and N\-U\-L\-L.



Referenced by class2(), and virtual\-\_\-node().

\index{fastgr.\-c@{fastgr.\-c}!fast\-\_\-nodeapp@{fast\-\_\-nodeapp}}
\index{fast\-\_\-nodeapp@{fast\-\_\-nodeapp}!fastgr.c@{fastgr.\-c}}
\subsubsection[{fast\-\_\-nodeapp}]{\setlength{\rightskip}{0pt plus 5cm}void fast\-\_\-nodeapp (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{u, }
\item[{{\bf node\-\_\-t} $\ast$}]{v}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a10843e5d6b59040ea8694509b6eaed2a}


Definition at line 218 of file fastgr.\-c.



References assert, N\-D\-\_\-next, N\-D\-\_\-prev, and N\-U\-L\-L.

\index{fastgr.\-c@{fastgr.\-c}!find\-\_\-fast\-\_\-edge@{find\-\_\-fast\-\_\-edge}}
\index{find\-\_\-fast\-\_\-edge@{find\-\_\-fast\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{find\-\_\-fast\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\-\_\-t}$\ast$ find\-\_\-fast\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{u, }
\item[{{\bf node\-\_\-t} $\ast$}]{v}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a1df4c025099e2e19541accfc4cfe7f78}


Definition at line 42 of file fastgr.\-c.



References N\-D\-\_\-in, and N\-D\-\_\-out.



Referenced by class1(), and reverse\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!find\-\_\-flat\-\_\-edge@{find\-\_\-flat\-\_\-edge}}
\index{find\-\_\-flat\-\_\-edge@{find\-\_\-flat\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{find\-\_\-flat\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\-\_\-t}$\ast$ find\-\_\-flat\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{u, }
\item[{{\bf node\-\_\-t} $\ast$}]{v}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a37284addd91e278c5e9fae03cae0c8a7}


Definition at line 57 of file fastgr.\-c.



References N\-D\-\_\-flat\-\_\-in, and N\-D\-\_\-flat\-\_\-out.



Referenced by interclexp().

\index{fastgr.\-c@{fastgr.\-c}!flat\-\_\-edge@{flat\-\_\-edge}}
\index{flat\-\_\-edge@{flat\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{flat\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}void flat\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g, }
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a8c6b3f9e7cbefb1ffff13dd6aa7556c4}


Definition at line 260 of file fastgr.\-c.



References aghead(), agtail(), dot\-\_\-root(), elist\-\_\-append, G\-D\-\_\-has\-\_\-flat\-\_\-edges, N\-D\-\_\-flat\-\_\-in, N\-D\-\_\-flat\-\_\-out, and T\-R\-U\-E.



Referenced by class2(), flat\-\_\-rev(), and interclexp().

\index{fastgr.\-c@{fastgr.\-c}!merge\-\_\-oneway@{merge\-\_\-oneway}}
\index{merge\-\_\-oneway@{merge\-\_\-oneway}!fastgr.c@{fastgr.\-c}}
\subsubsection[{merge\-\_\-oneway}]{\setlength{\rightskip}{0pt plus 5cm}void merge\-\_\-oneway (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e, }
\item[{{\bf edge\-\_\-t} $\ast$}]{rep}
\end{DoxyParamCaption}
)}\label{fastgr_8c_aeac5d2d858f0978be300def88633a3b6}


Definition at line 334 of file fastgr.\-c.



References agerr(), A\-G\-W\-A\-R\-N, assert, E\-D\-\_\-to\-\_\-virt, and N\-U\-L\-L.



Referenced by class1(), class2(), flat\-\_\-rev(), interclexp(), and reverse\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!new\-\_\-virtual\-\_\-edge@{new\-\_\-virtual\-\_\-edge}}
\index{new\-\_\-virtual\-\_\-edge@{new\-\_\-virtual\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{new\-\_\-virtual\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\-\_\-t}$\ast$ new\-\_\-virtual\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{u, }
\item[{{\bf node\-\_\-t} $\ast$}]{v, }
\item[{{\bf edge\-\_\-t} $\ast$}]{orig}
\end{DoxyParamCaption}
)}\label{fastgr_8c_aae620dfe80e6bcbd9c84c6311bc529bf}


Definition at line 162 of file fastgr.\-c.



References aghead(), A\-G\-I\-N\-E\-D\-G\-E, A\-G\-O\-U\-T\-E\-D\-G\-E, A\-G\-S\-E\-Q, agtail(), A\-G\-T\-Y\-P\-E, Agedge\-\_\-s\-::base, Agobj\-\_\-s\-::data, E\-D\-\_\-count, E\-D\-\_\-edge\-\_\-type, E\-D\-\_\-head\-\_\-port, E\-D\-\_\-minlen, E\-D\-\_\-tail\-\_\-port, E\-D\-\_\-to\-\_\-orig, E\-D\-\_\-to\-\_\-virt, E\-D\-\_\-weight, E\-D\-\_\-xpenalty, Agedgepair\-\_\-s\-::in, N\-E\-W, N\-U\-L\-L, Agedgepair\-\_\-s\-::out, and V\-I\-R\-T\-U\-A\-L.



Referenced by flat\-\_\-rev(), and virtual\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!other\-\_\-edge@{other\-\_\-edge}}
\index{other\-\_\-edge@{other\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{other\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}void other\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_aad0e676cf697d4588a0aa546a384c586}


Definition at line 137 of file fastgr.\-c.



References agtail(), elist\-\_\-append, and N\-D\-\_\-other.



Referenced by class2().

\index{fastgr.\-c@{fastgr.\-c}!safe\-\_\-other\-\_\-edge@{safe\-\_\-other\-\_\-edge}}
\index{safe\-\_\-other\-\_\-edge@{safe\-\_\-other\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{safe\-\_\-other\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}void safe\-\_\-other\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_aef2788cb1de7befeef93419531cd2aa0}


Definition at line 142 of file fastgr.\-c.



References agtail(), and N\-D\-\_\-other.



Referenced by interclexp().

\index{fastgr.\-c@{fastgr.\-c}!unmerge\-\_\-oneway@{unmerge\-\_\-oneway}}
\index{unmerge\-\_\-oneway@{unmerge\-\_\-oneway}!fastgr.c@{fastgr.\-c}}
\subsubsection[{unmerge\-\_\-oneway}]{\setlength{\rightskip}{0pt plus 5cm}void unmerge\-\_\-oneway (
\begin{DoxyParamCaption}
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_afa561a2eacbdcdb62a6bcd81190cc355}


Definition at line 353 of file fastgr.\-c.



References aghead(), E\-D\-\_\-count, E\-D\-\_\-edge\-\_\-type, E\-D\-\_\-to\-\_\-virt, N\-D\-\_\-node\-\_\-type, N\-D\-\_\-out, N\-U\-L\-L, and V\-I\-R\-T\-U\-A\-L.

\index{fastgr.\-c@{fastgr.\-c}!virtual\-\_\-edge@{virtual\-\_\-edge}}
\index{virtual\-\_\-edge@{virtual\-\_\-edge}!fastgr.c@{fastgr.\-c}}
\subsubsection[{virtual\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}{\bf edge\-\_\-t}$\ast$ virtual\-\_\-edge (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{u, }
\item[{{\bf node\-\_\-t} $\ast$}]{v, }
\item[{{\bf edge\-\_\-t} $\ast$}]{orig}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a27b5ec55120b9c8528436f02f1ec1409}


Definition at line 199 of file fastgr.\-c.



References fast\-\_\-edge(), and new\-\_\-virtual\-\_\-edge().



Referenced by build\-\_\-skeleton(), class1(), and reverse\-\_\-edge().

\index{fastgr.\-c@{fastgr.\-c}!virtual\-\_\-node@{virtual\-\_\-node}}
\index{virtual\-\_\-node@{virtual\-\_\-node}!fastgr.c@{fastgr.\-c}}
\subsubsection[{virtual\-\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}{\bf node\-\_\-t}$\ast$ virtual\-\_\-node (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a21419d22c6de6e156cae3bf37caa69d2}


Definition at line 240 of file fastgr.\-c.



References A\-G\-N\-O\-D\-E, agroot(), A\-G\-T\-Y\-P\-E, alloc\-\_\-elist, Agnode\-\_\-s\-::base, Agobj\-\_\-s\-::data, fast\-\_\-node(), G\-D\-\_\-n\-\_\-nodes, N\-D\-\_\-ht, N\-D\-\_\-in, N\-D\-\_\-lw, N\-D\-\_\-node\-\_\-type, N\-D\-\_\-out, N\-D\-\_\-rw, N\-D\-\_\-\-U\-F\-\_\-size, N\-E\-W, Agnode\-\_\-s\-::root, and V\-I\-R\-T\-U\-A\-L.



Referenced by build\-\_\-skeleton().

\index{fastgr.\-c@{fastgr.\-c}!zapinlist@{zapinlist}}
\index{zapinlist@{zapinlist}!fastgr.c@{fastgr.\-c}}
\subsubsection[{zapinlist}]{\setlength{\rightskip}{0pt plus 5cm}void zapinlist (
\begin{DoxyParamCaption}
\item[{{\bf elist} $\ast$}]{L, }
\item[{{\bf edge\-\_\-t} $\ast$}]{e}
\end{DoxyParamCaption}
)}\label{fastgr_8c_a23bff03f6a8a295ee9463aed225664e8}


Definition at line 100 of file fastgr.\-c.



References elist\-::list, N\-U\-L\-L, and elist\-::size.



Referenced by delete\-\_\-fast\-\_\-edge(), and delete\-\_\-flat\-\_\-edge().

