\section{lib/sfdpgen/\-Priority\-Queue.c File Reference}
\label{PriorityQueue_8c}\index{lib/sfdpgen/\-Priority\-Queue.\-c@{lib/sfdpgen/\-Priority\-Queue.\-c}}
{\ttfamily \#include \char`\"{}Linked\-List.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Priority\-Queue.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}memory.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}logic.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}assert.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}arith.\-h\char`\"{}}\\*
Include dependency graph for Priority\-Queue.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{PriorityQueue_8c__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf M\-A\-L\-L\-O\-C}~{\bf gmalloc}
\item 
\#define {\bf R\-E\-A\-L\-L\-O\-C}~{\bf grealloc}
\item 
\#define {\bf F\-R\-E\-E}~free
\item 
\#define {\bf M\-E\-M\-C\-P\-Y}~memcpy
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Priority\-Queue} {\bf Priority\-Queue\-\_\-new} ({\bf int} n, {\bf int} ngain)
\item 
void {\bf Priority\-Queue\-\_\-delete} ({\bf Priority\-Queue} q)
\item 
{\bf Priority\-Queue} {\bf Priority\-Queue\-\_\-push} ({\bf Priority\-Queue} q, {\bf int} i, {\bf int} gain)
\item 
{\bf int} {\bf Priority\-Queue\-\_\-pop} ({\bf Priority\-Queue} q, {\bf int} $\ast$i, {\bf int} $\ast$gain)
\item 
{\bf int} {\bf Priority\-Queue\-\_\-get\-\_\-gain} ({\bf Priority\-Queue} q, {\bf int} i)
\item 
{\bf int} {\bf Priority\-Queue\-\_\-remove} ({\bf Priority\-Queue} q, {\bf int} i)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!F\-R\-E\-E@{F\-R\-E\-E}}
\index{F\-R\-E\-E@{F\-R\-E\-E}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{F\-R\-E\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define F\-R\-E\-E~free}\label{PriorityQueue_8c_a9a8e700d56e7d858108b755ad3edb52e}


Definition at line 23 of file Priority\-Queue.\-c.



Referenced by attached\-\_\-clustering(), Binary\-Heap\-\_\-delete(), Binary\-Heap\-\_\-sanity\-\_\-check(), cg(), Distance\-Matrix\-\_\-restrict\-\_\-cluster(), ideal\-\_\-distance\-\_\-matrix(), Import\-\_\-coord\-\_\-clusters\-\_\-from\-\_\-dot(), interpolate\-\_\-coord(), Int\-Stack\-\_\-delete(), jacobi(), main(), make\-Dot\-Graph(), Multilevel\-\_\-coarsen(), Multilevel\-\_\-control\-\_\-delete(), Multilevel\-\_\-delete(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-delete(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-establish(), node\-\_\-data\-\_\-delete(), oned\-\_\-optimizer\-\_\-delete(), Operator\-\_\-diag\-\_\-precon\-\_\-delete(), Operator\-\_\-matmul\-\_\-delete(), Operator\-\_\-uniform\-\_\-stress\-\_\-matmul\-\_\-delete(), power\-\_\-law\-\_\-graph(), Priority\-Queue\-\_\-delete(), Quad\-Tree\-\_\-delete(), Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list(), Sparse\-Matrix\-\_\-add(), Sparse\-Matrix\-\_\-complement(), Sparse\-Matrix\-\_\-connected\-Q(), Sparse\-Matrix\-\_\-decompose\-\_\-to\-\_\-supervariables(), Sparse\-Matrix\-\_\-delete(), Sparse\-Matrix\-\_\-delete\-\_\-sparse\-\_\-columns(), Sparse\-Matrix\-\_\-distance\-\_\-matrix(), Sparse\-Matrix\-\_\-distance\-\_\-matrix\-\_\-k\-\_\-centers(), Sparse\-Matrix\-\_\-distance\-\_\-matrix\-\_\-khops(), Sparse\-Matrix\-\_\-exclude\-\_\-submatrix(), Sparse\-Matrix\-\_\-get\-\_\-augmented(), Sparse\-Matrix\-\_\-get\-\_\-submatrix(), Sparse\-Matrix\-\_\-import\-\_\-dot(), Sparse\-Matrix\-\_\-is\-\_\-symmetric(), Sparse\-Matrix\-\_\-k\-\_\-centers(), Sparse\-Matrix\-\_\-k\-\_\-centers\-\_\-user(), Sparse\-Matrix\-\_\-largest\-\_\-component(), Sparse\-Matrix\-\_\-multiply(), Sparse\-Matrix\-\_\-multiply3(), Sparse\-Matrix\-\_\-multiply\-\_\-by\-\_\-scaler(), Sparse\-Matrix\-\_\-page\-\_\-rank(), Sparse\-Matrix\-\_\-pseudo\-\_\-diameter\-\_\-unweighted(), Sparse\-Matrix\-\_\-pseudo\-\_\-diameter\-\_\-weighted(), Sparse\-Matrix\-\_\-set\-\_\-entries\-\_\-to\-\_\-real\-\_\-one(), Sparse\-Matrix\-\_\-sum\-\_\-repeat\-\_\-entries(), Sparse\-Matrix\-\_\-to\-\_\-complex(), Sparse\-Matrix\-\_\-weakly\-\_\-connected\-\_\-components(), spring\-\_\-electrical\-\_\-control\-\_\-delete(), spring\-\_\-electrical\-\_\-embedding(), spring\-\_\-electrical\-\_\-embedding\-\_\-fast(), spring\-\_\-electrical\-\_\-embedding\-\_\-slow(), spring\-\_\-electrical\-\_\-spring\-\_\-embedding(), spring\-\_\-maxent\-\_\-embedding(), Spring\-Smoother\-\_\-new(), Stress\-Majorization\-Smoother2\-\_\-new(), Stress\-Majorization\-Smoother\-\_\-delete(), Stress\-Majorization\-Smoother\-\_\-smooth(), Triangle\-Smoother\-\_\-new(), Uniform\-Stress\-Smoother\-\_\-new(), vector\-\_\-median(), vector\-\_\-ordering(), and vector\-\_\-percentile().

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!M\-A\-L\-L\-O\-C@{M\-A\-L\-L\-O\-C}}
\index{M\-A\-L\-L\-O\-C@{M\-A\-L\-L\-O\-C}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{M\-A\-L\-L\-O\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-L\-L\-O\-C~{\bf gmalloc}}\label{PriorityQueue_8c_a3e218828af7ddd3f4cd0d3772562b520}


Definition at line 21 of file Priority\-Queue.\-c.



Referenced by attached\-\_\-clustering(), Binary\-Heap\-\_\-new(), Binary\-Heap\-\_\-sanity\-\_\-check(), Import\-\_\-coord\-\_\-clusters\-\_\-from\-\_\-dot(), interpolate\-\_\-coord(), Int\-Stack\-\_\-new(), jacobi(), make\-Dot\-Graph(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-establish(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-init(), oned\-\_\-optimizer\-\_\-new(), Operator\-\_\-uniform\-\_\-stress\-\_\-diag\-\_\-precon\-\_\-new(), Operator\-\_\-uniform\-\_\-stress\-\_\-matmul(), power\-\_\-law\-\_\-graph(), Quad\-Tree\-\_\-get\-\_\-supernodes(), Quad\-Tree\-\_\-new(), Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list(), random\-\_\-permutation(), Sparse\-Matrix\-\_\-add(), Sparse\-Matrix\-\_\-complement(), Sparse\-Matrix\-\_\-decompose\-\_\-to\-\_\-supervariables(), Sparse\-Matrix\-\_\-delete\-\_\-sparse\-\_\-columns(), Sparse\-Matrix\-\_\-distance\-\_\-matrix(), Sparse\-Matrix\-\_\-distance\-\_\-matrix\-\_\-khops(), Sparse\-Matrix\-\_\-exclude\-\_\-submatrix(), Sparse\-Matrix\-\_\-get\-\_\-augmented(), Sparse\-Matrix\-\_\-get\-\_\-real\-\_\-adjacency\-\_\-matrix\-\_\-symmetrized(), Sparse\-Matrix\-\_\-get\-\_\-submatrix(), Sparse\-Matrix\-\_\-import\-\_\-dot(), Sparse\-Matrix\-\_\-is\-\_\-symmetric(), Sparse\-Matrix\-\_\-k\-\_\-centers(), Sparse\-Matrix\-\_\-k\-\_\-centers\-\_\-user(), Sparse\-Matrix\-\_\-level\-\_\-sets\-\_\-internal(), Sparse\-Matrix\-\_\-multiply(), Sparse\-Matrix\-\_\-multiply3(), Sparse\-Matrix\-\_\-multiply\-\_\-by\-\_\-scaler(), Sparse\-Matrix\-\_\-multiply\-\_\-vector(), Sparse\-Matrix\-\_\-page\-\_\-rank(), Sparse\-Matrix\-\_\-pseudo\-\_\-diameter\-\_\-weighted(), Sparse\-Matrix\-\_\-set\-\_\-entries\-\_\-to\-\_\-real\-\_\-one(), Sparse\-Matrix\-\_\-sum\-\_\-repeat\-\_\-entries(), Sparse\-Matrix\-\_\-to\-\_\-complex(), Sparse\-Matrix\-\_\-weakly\-\_\-connected\-\_\-components(), Sparse\-Stress\-Majorization\-Smoother\-\_\-new(), spring\-\_\-electrical\-\_\-control\-\_\-new(), spring\-\_\-electrical\-\_\-embedding(), spring\-\_\-electrical\-\_\-embedding\-\_\-fast(), spring\-\_\-electrical\-\_\-embedding\-\_\-slow(), spring\-\_\-electrical\-\_\-spring\-\_\-embedding(), spring\-\_\-maxent\-\_\-embedding(), stress\-\_\-model\-\_\-core(), Stress\-Majorization\-Smoother\-\_\-smooth(), String\-Vector\-\_\-part(), Uniform\-Stress\-Smoother\-\_\-new(), vector\-\_\-float\-\_\-take(), vector\-\_\-ordering(), and vector\-\_\-take().

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!M\-E\-M\-C\-P\-Y@{M\-E\-M\-C\-P\-Y}}
\index{M\-E\-M\-C\-P\-Y@{M\-E\-M\-C\-P\-Y}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{M\-E\-M\-C\-P\-Y}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-E\-M\-C\-P\-Y~memcpy}\label{PriorityQueue_8c_afa49f5cbf45954321f45b92170a5fac2}


Definition at line 24 of file Priority\-Queue.\-c.



Referenced by jacobi(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-establish(), Sparse\-Matrix\-\_\-coordinate\-\_\-form\-\_\-add\-\_\-entries(), Sparse\-Matrix\-\_\-copy(), Sparse\-Matrix\-\_\-get\-\_\-augmented(), Sparse\-Matrix\-\_\-get\-\_\-real\-\_\-adjacency\-\_\-matrix\-\_\-symmetrized(), Sparse\-Matrix\-\_\-page\-\_\-rank(), spring\-\_\-electrical\-\_\-embedding(), spring\-\_\-electrical\-\_\-embedding\-\_\-fast(), spring\-\_\-electrical\-\_\-embedding\-\_\-slow(), spring\-\_\-electrical\-\_\-spring\-\_\-embedding(), spring\-\_\-maxent\-\_\-embedding(), and Stress\-Majorization\-Smoother\-\_\-smooth().

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!R\-E\-A\-L\-L\-O\-C@{R\-E\-A\-L\-L\-O\-C}}
\index{R\-E\-A\-L\-L\-O\-C@{R\-E\-A\-L\-L\-O\-C}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{R\-E\-A\-L\-L\-O\-C}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-E\-A\-L\-L\-O\-C~{\bf grealloc}}\label{PriorityQueue_8c_a2e501a3b49991d5e526b5c52c1522df4}


Definition at line 22 of file Priority\-Queue.\-c.



Referenced by check\-\_\-int\-\_\-array\-\_\-size(), check\-\_\-or\-\_\-realloc\-\_\-arrays(), check\-\_\-real\-\_\-array\-\_\-size(), Multilevel\-\_\-\-M\-Q\-\_\-\-Clustering\-\_\-establish(), and Sparse\-Matrix\-\_\-to\-\_\-complex().



\subsection{Function Documentation}
\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-delete@{Priority\-Queue\-\_\-delete}}
\index{Priority\-Queue\-\_\-delete@{Priority\-Queue\-\_\-delete}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-delete}]{\setlength{\rightskip}{0pt plus 5cm}void Priority\-Queue\-\_\-delete (
\begin{DoxyParamCaption}
\item[{{\bf Priority\-Queue}}]{q}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_a5be696c5597299fc2cacd72a3544b0a5}


Definition at line 47 of file Priority\-Queue.\-c.



References Priority\-Queue\-\_\-struct\-::buckets, Double\-Linked\-List\-\_\-delete(), F\-R\-E\-E, Priority\-Queue\-\_\-struct\-::gain, Priority\-Queue\-\_\-struct\-::ngain, and Priority\-Queue\-\_\-struct\-::where.

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-get\-\_\-gain@{Priority\-Queue\-\_\-get\-\_\-gain}}
\index{Priority\-Queue\-\_\-get\-\_\-gain@{Priority\-Queue\-\_\-get\-\_\-gain}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-get\-\_\-gain}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} Priority\-Queue\-\_\-get\-\_\-gain (
\begin{DoxyParamCaption}
\item[{{\bf Priority\-Queue}}]{q, }
\item[{{\bf int}}]{i}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_a93870e2c9598cf7eeb124114a9015c24}


Definition at line 125 of file Priority\-Queue.\-c.



References Priority\-Queue\-\_\-struct\-::gain.

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-new@{Priority\-Queue\-\_\-new}}
\index{Priority\-Queue\-\_\-new@{Priority\-Queue\-\_\-new}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Priority\-Queue} Priority\-Queue\-\_\-new (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{n, }
\item[{{\bf int}}]{ngain}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_aab6234d385e171923933b2cf5b296edb}


Definition at line 27 of file Priority\-Queue.\-c.



References Priority\-Queue\-\_\-struct\-::buckets, Priority\-Queue\-\_\-struct\-::count, Priority\-Queue\-\_\-struct\-::gain, Priority\-Queue\-\_\-struct\-::gain\-\_\-max, Priority\-Queue\-\_\-struct\-::n, N\-\_\-\-G\-N\-E\-W, Priority\-Queue\-\_\-struct\-::ngain, N\-U\-L\-L, and Priority\-Queue\-\_\-struct\-::where.

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-pop@{Priority\-Queue\-\_\-pop}}
\index{Priority\-Queue\-\_\-pop@{Priority\-Queue\-\_\-pop}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-pop}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} Priority\-Queue\-\_\-pop (
\begin{DoxyParamCaption}
\item[{{\bf Priority\-Queue}}]{q, }
\item[{{\bf int} $\ast$}]{i, }
\item[{{\bf int} $\ast$}]{gain}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_a37704afd389a3ea12d6340901505e5cf}


Definition at line 100 of file Priority\-Queue.\-c.



References Priority\-Queue\-\_\-struct\-::buckets, Priority\-Queue\-\_\-struct\-::count, Double\-Linked\-List\-\_\-delete\-\_\-element(), Double\-Linked\-List\-\_\-get\-\_\-data(), Priority\-Queue\-\_\-struct\-::gain, Priority\-Queue\-\_\-struct\-::gain\-\_\-max, N\-U\-L\-L, and Priority\-Queue\-\_\-struct\-::where.

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-push@{Priority\-Queue\-\_\-push}}
\index{Priority\-Queue\-\_\-push@{Priority\-Queue\-\_\-push}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-push}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Priority\-Queue} Priority\-Queue\-\_\-push (
\begin{DoxyParamCaption}
\item[{{\bf Priority\-Queue}}]{q, }
\item[{{\bf int}}]{i, }
\item[{{\bf int}}]{gain}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_ab6238b96ce271ac5ebf481c3725103c4}


Definition at line 65 of file Priority\-Queue.\-c.



References assert, Priority\-Queue\-\_\-struct\-::buckets, Priority\-Queue\-\_\-struct\-::count, Double\-Linked\-List\-\_\-delete\-\_\-element(), Double\-Linked\-List\-\_\-new(), Double\-Linked\-List\-\_\-prepend(), Priority\-Queue\-\_\-struct\-::gain, Priority\-Queue\-\_\-struct\-::gain\-\_\-max, N\-\_\-\-G\-N\-E\-W, N\-U\-L\-L, Priority\-Queue\-\_\-push(), and Priority\-Queue\-\_\-struct\-::where.



Referenced by Priority\-Queue\-\_\-push().

\index{Priority\-Queue.\-c@{Priority\-Queue.\-c}!Priority\-Queue\-\_\-remove@{Priority\-Queue\-\_\-remove}}
\index{Priority\-Queue\-\_\-remove@{Priority\-Queue\-\_\-remove}!PriorityQueue.c@{Priority\-Queue.\-c}}
\subsubsection[{Priority\-Queue\-\_\-remove}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} Priority\-Queue\-\_\-remove (
\begin{DoxyParamCaption}
\item[{{\bf Priority\-Queue}}]{q, }
\item[{{\bf int}}]{i}
\end{DoxyParamCaption}
)}\label{PriorityQueue_8c_a811bef87d31e1b89cc9597835b4664f8}


Definition at line 129 of file Priority\-Queue.\-c.



References Priority\-Queue\-\_\-struct\-::buckets, Priority\-Queue\-\_\-struct\-::count, Double\-Linked\-List\-\_\-delete\-\_\-element(), Priority\-Queue\-\_\-struct\-::gain, Priority\-Queue\-\_\-struct\-::gain\-\_\-max, N\-U\-L\-L, and Priority\-Queue\-\_\-struct\-::where.

