\section{lib/neatogen/bfs.c File Reference}
\label{bfs_8c}\index{lib/neatogen/bfs.\-c@{lib/neatogen/bfs.\-c}}
{\ttfamily \#include \char`\"{}bfs.\-h\char`\"{}}\\*
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
Include dependency graph for bfs.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{bfs_8c__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf bfs} ({\bf int} {\bf vertex}, {\bf vtx\-\_\-data} $\ast${\bf graph}, {\bf int} n, {\bf Dist\-Type} $\ast${\bf dist}, {\bf Queue} $\ast$Q)
\item 
{\bf int} {\bf bfs\-\_\-bounded} ({\bf int} {\bf vertex}, {\bf vtx\-\_\-data} $\ast${\bf graph}, {\bf int} n, {\bf Dist\-Type} $\ast${\bf dist}, {\bf Queue} $\ast$Q, {\bf int} bound, {\bf int} $\ast$visited\-\_\-nodes)
\item 
void {\bf mk\-Queue} ({\bf Queue} $\ast$qp, {\bf int} size)
\item 
{\bf Queue} $\ast$ {\bf new\-Queue} ({\bf int} size)
\item 
void {\bf free\-Queue} ({\bf Queue} $\ast$qp)
\item 
void {\bf del\-Queue} ({\bf Queue} $\ast$qp)
\item 
void {\bf init\-Queue} ({\bf Queue} $\ast$qp, {\bf int} start\-Vertex)
\item 
{\bf boolean} {\bf de\-Queue} ({\bf Queue} $\ast$qp, {\bf int} $\ast${\bf vertex})
\item 
{\bf boolean} {\bf en\-Queue} ({\bf Queue} $\ast$qp, {\bf int} {\bf vertex})
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\index{bfs.\-c@{bfs.\-c}!bfs@{bfs}}
\index{bfs@{bfs}!bfs.c@{bfs.\-c}}
\subsubsection[{bfs}]{\setlength{\rightskip}{0pt plus 5cm}void bfs (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{vertex, }
\item[{{\bf vtx\-\_\-data} $\ast$}]{graph, }
\item[{{\bf int}}]{n, }
\item[{{\bf Dist\-Type} $\ast$}]{dist, }
\item[{{\bf Queue} $\ast$}]{Q}
\end{DoxyParamCaption}
)}\label{bfs_8c_a0c1bcae1ead3b84d48768e6f23ad7652}


Definition at line 27 of file bfs.\-c.



References de\-Queue(), vtx\-\_\-data\-::edges, en\-Queue(), init\-Queue(), I\-N\-T\-\_\-\-M\-A\-X, vtx\-\_\-data\-::nedges, and N\-U\-L\-L.



Referenced by compute\-\_\-apsp\-\_\-packed(), and embed\-\_\-graph().

\index{bfs.\-c@{bfs.\-c}!bfs\-\_\-bounded@{bfs\-\_\-bounded}}
\index{bfs\-\_\-bounded@{bfs\-\_\-bounded}!bfs.c@{bfs.\-c}}
\subsubsection[{bfs\-\_\-bounded}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} bfs\-\_\-bounded (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{vertex, }
\item[{{\bf vtx\-\_\-data} $\ast$}]{graph, }
\item[{{\bf int}}]{n, }
\item[{{\bf Dist\-Type} $\ast$}]{dist, }
\item[{{\bf Queue} $\ast$}]{Q, }
\item[{{\bf int}}]{bound, }
\item[{{\bf int} $\ast$}]{visited\-\_\-nodes}
\end{DoxyParamCaption}
)}\label{bfs_8c_a88bfc6a3d9712e01237196d0184f3cd4}


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



References de\-Queue(), vtx\-\_\-data\-::edges, en\-Queue(), init\-Queue(), and vtx\-\_\-data\-::nedges.



Referenced by dijkstra\-\_\-bounded().

\index{bfs.\-c@{bfs.\-c}!del\-Queue@{del\-Queue}}
\index{del\-Queue@{del\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{del\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}void del\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp}
\end{DoxyParamCaption}
)}\label{bfs_8c_a2749e607f57dcdbe425b73d1a1a7ba1a}


Definition at line 141 of file bfs.\-c.



References Queue\-::data.

\index{bfs.\-c@{bfs.\-c}!de\-Queue@{de\-Queue}}
\index{de\-Queue@{de\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{de\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}{\bf boolean} de\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp, }
\item[{{\bf int} $\ast$}]{vertex}
\end{DoxyParamCaption}
)}\label{bfs_8c_ab01f220daad1e24c9f7b934a6c572957}


Definition at line 154 of file bfs.\-c.



References Queue\-::data, Queue\-::end, F\-A\-L\-S\-E, Queue\-::start, and T\-R\-U\-E.



Referenced by bfs(), and bfs\-\_\-bounded().

\index{bfs.\-c@{bfs.\-c}!en\-Queue@{en\-Queue}}
\index{en\-Queue@{en\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{en\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}{\bf boolean} en\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp, }
\item[{{\bf int}}]{vertex}
\end{DoxyParamCaption}
)}\label{bfs_8c_a7229be668452c8a4349d6a1e8e621beb}


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



References Queue\-::data, Queue\-::end, F\-A\-L\-S\-E, Queue\-::queue\-Size, and T\-R\-U\-E.



Referenced by bfs(), and bfs\-\_\-bounded().

\index{bfs.\-c@{bfs.\-c}!free\-Queue@{free\-Queue}}
\index{free\-Queue@{free\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{free\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}void free\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp}
\end{DoxyParamCaption}
)}\label{bfs_8c_a6d998ea1b52e423b1633b7e3c411c5e4}


Definition at line 136 of file bfs.\-c.



References Queue\-::data.



Referenced by compute\-\_\-apsp\-\_\-packed(), and dijkstra\-\_\-bounded().

\index{bfs.\-c@{bfs.\-c}!init\-Queue@{init\-Queue}}
\index{init\-Queue@{init\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{init\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}void init\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp, }
\item[{{\bf int}}]{start\-Vertex}
\end{DoxyParamCaption}
)}\label{bfs_8c_a62b29974e7b862f6d94b204668075c4f}


Definition at line 147 of file bfs.\-c.



References Queue\-::data, Queue\-::end, and Queue\-::start.



Referenced by bfs(), and bfs\-\_\-bounded().

\index{bfs.\-c@{bfs.\-c}!mk\-Queue@{mk\-Queue}}
\index{mk\-Queue@{mk\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{mk\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}void mk\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf Queue} $\ast$}]{qp, }
\item[{{\bf int}}]{size}
\end{DoxyParamCaption}
)}\label{bfs_8c_aa2a52368a9f082bddf156fda174c3239}


Definition at line 122 of file bfs.\-c.



References Queue\-::data, Queue\-::end, N\-\_\-\-G\-N\-E\-W, Queue\-::queue\-Size, and Queue\-::start.



Referenced by compute\-\_\-apsp\-\_\-packed(), dijkstra\-\_\-bounded(), embed\-\_\-graph(), and new\-Queue().

\index{bfs.\-c@{bfs.\-c}!new\-Queue@{new\-Queue}}
\index{new\-Queue@{new\-Queue}!bfs.c@{bfs.\-c}}
\subsubsection[{new\-Queue}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Queue}$\ast$ new\-Queue (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{size}
\end{DoxyParamCaption}
)}\label{bfs_8c_a9e2f65261454df65284fc34b353ef534}


Definition at line 129 of file bfs.\-c.



References G\-N\-E\-W, and mk\-Queue().

