\section{lib/sfdpgen/\-Multilevel.c File Reference}
\label{Multilevel_8c}\index{lib/sfdpgen/\-Multilevel.\-c@{lib/sfdpgen/\-Multilevel.\-c}}
{\ttfamily \#include \char`\"{}Multilevel.\-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 Multilevel.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{Multilevel_8c__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf node\-\_\-degree}(i)~(ia[(i)+1] -\/ ia[(i)])
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Multilevel\-\_\-control} {\bf Multilevel\-\_\-control\-\_\-new} ({\bf int} scheme, {\bf int} mode)
\item 
void {\bf Multilevel\-\_\-control\-\_\-delete} ({\bf Multilevel\-\_\-control} ctrl)
\item 
void {\bf Multilevel\-\_\-delete} ({\bf Multilevel} grid)
\item 
{\bf Sparse\-Matrix} {\bf Distance\-Matrix\-\_\-restrict\-\_\-cluster} ({\bf int} ncluster, {\bf int} $\ast$clusterp, {\bf int} $\ast$cluster, {\bf Sparse\-Matrix} P, {\bf Sparse\-Matrix} R, {\bf Sparse\-Matrix} D)
\item 
{\bf Sparse\-Matrix} {\bf Distance\-Matrix\-\_\-restrict\-\_\-matching} ({\bf int} $\ast$matching, {\bf Sparse\-Matrix} D)
\item 
{\bf Sparse\-Matrix} {\bf Distance\-Matrix\-\_\-restrict\-\_\-filtering} ({\bf int} $\ast$mask, {\bf int} is\-\_\-\-C, {\bf int} is\-\_\-\-F, {\bf Sparse\-Matrix} D)
\item 
void {\bf Multilevel\-\_\-coarsen} ({\bf Sparse\-Matrix} A, {\bf Sparse\-Matrix} $\ast$c\-A, {\bf Sparse\-Matrix} D, {\bf Sparse\-Matrix} $\ast$c\-D, {\bf real} $\ast$node\-\_\-wgt, {\bf real} $\ast$$\ast$cnode\-\_\-wgt, {\bf Sparse\-Matrix} $\ast$P, {\bf Sparse\-Matrix} $\ast$R, {\bf Multilevel\-\_\-control} ctrl, {\bf int} $\ast$coarsen\-\_\-scheme\-\_\-used)
\item 
void {\bf print\-\_\-padding} ({\bf int} n)
\item 
{\bf Multilevel} {\bf Multilevel\-\_\-new} ({\bf Sparse\-Matrix} A0, {\bf Sparse\-Matrix} D0, {\bf real} $\ast$node\-\_\-weights, {\bf Multilevel\-\_\-control} ctrl)
\item 
{\bf Multilevel} {\bf Multilevel\-\_\-get\-\_\-coarsest} ({\bf Multilevel} grid)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{Multilevel.\-c@{Multilevel.\-c}!node\-\_\-degree@{node\-\_\-degree}}
\index{node\-\_\-degree@{node\-\_\-degree}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{node\-\_\-degree}]{\setlength{\rightskip}{0pt plus 5cm}\#define node\-\_\-degree(
\begin{DoxyParamCaption}
\item[{}]{i}
\end{DoxyParamCaption}
)~(ia[(i)+1] -\/ ia[(i)])}\label{Multilevel_8c_af6b7916ade63c266e8833e47f87920f7}


Definition at line 324 of file Multilevel.\-c.



\subsection{Function Documentation}
\index{Multilevel.\-c@{Multilevel.\-c}!Distance\-Matrix\-\_\-restrict\-\_\-cluster@{Distance\-Matrix\-\_\-restrict\-\_\-cluster}}
\index{Distance\-Matrix\-\_\-restrict\-\_\-cluster@{Distance\-Matrix\-\_\-restrict\-\_\-cluster}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Distance\-Matrix\-\_\-restrict\-\_\-cluster}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Sparse\-Matrix} Distance\-Matrix\-\_\-restrict\-\_\-cluster (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{ncluster, }
\item[{{\bf int} $\ast$}]{clusterp, }
\item[{{\bf int} $\ast$}]{cluster, }
\item[{{\bf Sparse\-Matrix}}]{P, }
\item[{{\bf Sparse\-Matrix}}]{R, }
\item[{{\bf Sparse\-Matrix}}]{D}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a3ed4ca6b30ba00dd0de72bb0fd88ea8e}


Definition at line 815 of file Multilevel.\-c.



References Sparse\-Matrix\-\_\-struct\-::a, assert, F\-R\-E\-E, Sparse\-Matrix\-\_\-struct\-::ia, Sparse\-Matrix\-\_\-struct\-::ja, Sparse\-Matrix\-\_\-struct\-::m, M\-A\-T\-R\-I\-X\-\_\-\-T\-Y\-P\-E\-\_\-\-R\-E\-A\-L, Sparse\-Matrix\-\_\-struct\-::n, N\-\_\-\-G\-N\-E\-W, N\-U\-L\-L, real, Sparse\-Matrix\-\_\-delete(), Sparse\-Matrix\-\_\-from\-\_\-coordinate\-\_\-arrays(), Sparse\-Matrix\-\_\-multiply3(), Sparse\-Matrix\-\_\-remove\-\_\-diagonal(), Sparse\-Matrix\-\_\-set\-\_\-pattern\-\_\-symmetric, Sparse\-Matrix\-\_\-set\-\_\-symmetric, and Sparse\-Matrix\-\_\-struct\-::type.

\index{Multilevel.\-c@{Multilevel.\-c}!Distance\-Matrix\-\_\-restrict\-\_\-filtering@{Distance\-Matrix\-\_\-restrict\-\_\-filtering}}
\index{Distance\-Matrix\-\_\-restrict\-\_\-filtering@{Distance\-Matrix\-\_\-restrict\-\_\-filtering}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Distance\-Matrix\-\_\-restrict\-\_\-filtering}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Sparse\-Matrix} Distance\-Matrix\-\_\-restrict\-\_\-filtering (
\begin{DoxyParamCaption}
\item[{{\bf int} $\ast$}]{mask, }
\item[{{\bf int}}]{is\-\_\-\-C, }
\item[{{\bf int}}]{is\-\_\-\-F, }
\item[{{\bf Sparse\-Matrix}}]{D}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_aa85a4da1f2dc779e8639c29678e80131}


Definition at line 941 of file Multilevel.\-c.



References assert, and N\-U\-L\-L.

\index{Multilevel.\-c@{Multilevel.\-c}!Distance\-Matrix\-\_\-restrict\-\_\-matching@{Distance\-Matrix\-\_\-restrict\-\_\-matching}}
\index{Distance\-Matrix\-\_\-restrict\-\_\-matching@{Distance\-Matrix\-\_\-restrict\-\_\-matching}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Distance\-Matrix\-\_\-restrict\-\_\-matching}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Sparse\-Matrix} Distance\-Matrix\-\_\-restrict\-\_\-matching (
\begin{DoxyParamCaption}
\item[{{\bf int} $\ast$}]{matching, }
\item[{{\bf Sparse\-Matrix}}]{D}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a209c1394e90e2f56c66cc79fa606bc3c}


Definition at line 935 of file Multilevel.\-c.



References assert, and N\-U\-L\-L.

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-coarsen@{Multilevel\-\_\-coarsen}}
\index{Multilevel\-\_\-coarsen@{Multilevel\-\_\-coarsen}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-coarsen}]{\setlength{\rightskip}{0pt plus 5cm}void Multilevel\-\_\-coarsen (
\begin{DoxyParamCaption}
\item[{{\bf Sparse\-Matrix}}]{A, }
\item[{{\bf Sparse\-Matrix} $\ast$}]{c\-A, }
\item[{{\bf Sparse\-Matrix}}]{D, }
\item[{{\bf Sparse\-Matrix} $\ast$}]{c\-D, }
\item[{{\bf real} $\ast$}]{node\-\_\-wgt, }
\item[{{\bf real} $\ast$$\ast$}]{cnode\-\_\-wgt, }
\item[{{\bf Sparse\-Matrix} $\ast$}]{P, }
\item[{{\bf Sparse\-Matrix} $\ast$}]{R, }
\item[{{\bf Multilevel\-\_\-control}}]{ctrl, }
\item[{{\bf int} $\ast$}]{coarsen\-\_\-scheme\-\_\-used}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a32b7405f87484f584c634c2e4c0c6001}


Definition at line 1201 of file Multilevel.\-c.



References assert, Multilevel\-\_\-control\-\_\-struct\-::coarsen\-\_\-mode, C\-O\-A\-R\-S\-E\-N\-\_\-\-M\-O\-D\-E\-\_\-\-F\-O\-R\-C\-E\-F\-U\-L, F\-R\-E\-E, Multilevel\-\_\-control\-\_\-struct\-::min\-\_\-coarsen\-\_\-factor, Sparse\-Matrix\-\_\-struct\-::n, N\-U\-L\-L, real, Sparse\-Matrix\-\_\-delete(), Sparse\-Matrix\-\_\-multiply(), and Verbose.

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-control\-\_\-delete@{Multilevel\-\_\-control\-\_\-delete}}
\index{Multilevel\-\_\-control\-\_\-delete@{Multilevel\-\_\-control\-\_\-delete}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-control\-\_\-delete}]{\setlength{\rightskip}{0pt plus 5cm}void Multilevel\-\_\-control\-\_\-delete (
\begin{DoxyParamCaption}
\item[{{\bf Multilevel\-\_\-control}}]{ctrl}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a1f69aa923440be2842a00c6183623eeb}


Definition at line 44 of file Multilevel.\-c.



References F\-R\-E\-E.

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-control\-\_\-new@{Multilevel\-\_\-control\-\_\-new}}
\index{Multilevel\-\_\-control\-\_\-new@{Multilevel\-\_\-control\-\_\-new}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-control\-\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Multilevel\-\_\-control} Multilevel\-\_\-control\-\_\-new (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{scheme, }
\item[{{\bf int}}]{mode}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_af2725f1c718a30180cb5cc42a312e280}


Definition at line 22 of file Multilevel.\-c.



References Multilevel\-\_\-control\-\_\-struct\-::coarsen\-\_\-mode, Multilevel\-\_\-control\-\_\-struct\-::coarsen\-\_\-scheme, G\-N\-E\-W, Multilevel\-\_\-control\-\_\-struct\-::maxlevel, Multilevel\-\_\-control\-\_\-struct\-::min\-\_\-coarsen\-\_\-factor, Multilevel\-\_\-control\-\_\-struct\-::minsize, Multilevel\-\_\-control\-\_\-struct\-::randomize, and T\-R\-U\-E.

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-delete@{Multilevel\-\_\-delete}}
\index{Multilevel\-\_\-delete@{Multilevel\-\_\-delete}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-delete}]{\setlength{\rightskip}{0pt plus 5cm}void Multilevel\-\_\-delete (
\begin{DoxyParamCaption}
\item[{{\bf Multilevel}}]{grid}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a5aa97757637d7935cf34198ee57547d7}


Definition at line 66 of file Multilevel.\-c.



References Multilevel\-\_\-struct\-::\-A, Multilevel\-\_\-struct\-::\-D, Multilevel\-\_\-struct\-::delete\-\_\-top\-\_\-level\-\_\-\-A, F\-R\-E\-E, Multilevel\-\_\-struct\-::level, Multilevel\-\_\-delete(), Multilevel\-\_\-struct\-::next, Multilevel\-\_\-struct\-::node\-\_\-weights, Multilevel\-\_\-struct\-::\-P, Multilevel\-\_\-struct\-::\-R, and Sparse\-Matrix\-\_\-delete().



Referenced by Multilevel\-\_\-delete().

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-get\-\_\-coarsest@{Multilevel\-\_\-get\-\_\-coarsest}}
\index{Multilevel\-\_\-get\-\_\-coarsest@{Multilevel\-\_\-get\-\_\-coarsest}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-get\-\_\-coarsest}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Multilevel} Multilevel\-\_\-get\-\_\-coarsest (
\begin{DoxyParamCaption}
\item[{{\bf Multilevel}}]{grid}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a2afd45b2be90ef99714d9fdf43c37842}


Definition at line 1312 of file Multilevel.\-c.



References Multilevel\-\_\-struct\-::next.

\index{Multilevel.\-c@{Multilevel.\-c}!Multilevel\-\_\-new@{Multilevel\-\_\-new}}
\index{Multilevel\-\_\-new@{Multilevel\-\_\-new}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{Multilevel\-\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Multilevel} Multilevel\-\_\-new (
\begin{DoxyParamCaption}
\item[{{\bf Sparse\-Matrix}}]{A0, }
\item[{{\bf Sparse\-Matrix}}]{D0, }
\item[{{\bf real} $\ast$}]{node\-\_\-weights, }
\item[{{\bf Multilevel\-\_\-control}}]{ctrl}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a170ca484ea0fbc3437226360ebea7454}


Definition at line 1294 of file Multilevel.\-c.



References Multilevel\-\_\-struct\-::delete\-\_\-top\-\_\-level\-\_\-\-A, F\-A\-L\-S\-E, M\-A\-T\-R\-I\-X\-\_\-\-T\-Y\-P\-E\-\_\-\-R\-E\-A\-L, Sparse\-Matrix\-\_\-get\-\_\-real\-\_\-adjacency\-\_\-matrix\-\_\-symmetrized(), Sparse\-Matrix\-\_\-is\-\_\-symmetric(), Sparse\-Matrix\-\_\-symmetrize\-\_\-nodiag(), T\-R\-U\-E, and Sparse\-Matrix\-\_\-struct\-::type.

\index{Multilevel.\-c@{Multilevel.\-c}!print\-\_\-padding@{print\-\_\-padding}}
\index{print\-\_\-padding@{print\-\_\-padding}!Multilevel.c@{Multilevel.\-c}}
\subsubsection[{print\-\_\-padding}]{\setlength{\rightskip}{0pt plus 5cm}void print\-\_\-padding (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{n}
\end{DoxyParamCaption}
)}\label{Multilevel_8c_a17aaf4056a45b4ffd16eeef2cabcc0aa}


Definition at line 1249 of file Multilevel.\-c.

