\section{lib/common/ns.c File Reference}
\label{ns_8c}\index{lib/common/ns.\-c@{lib/common/ns.\-c}}
{\ttfamily \#include \char`\"{}render.\-h\char`\"{}}\\*
{\ttfamily \#include $<$setjmp.\-h$>$}\\*
Include dependency graph for ns.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{ns_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf subtree\-\_\-s}
\item 
struct {\bf S\-Theap\-\_\-s}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf L\-E\-N\-G\-T\-H}(e)~({\bf N\-D\-\_\-rank}({\bf aghead}(e)) -\/ {\bf N\-D\-\_\-rank}({\bf agtail}(e)))
\item 
\#define {\bf S\-L\-A\-C\-K}(e)~({\bf L\-E\-N\-G\-T\-H}(e) -\/ {\bf E\-D\-\_\-minlen}(e))
\item 
\#define {\bf S\-E\-Q}(a, b, c)~(((a) $<$= (b)) \&\& ((b) $<$= (c)))
\item 
\#define {\bf T\-R\-E\-E\-\_\-\-E\-D\-G\-E}(e)~({\bf E\-D\-\_\-tree\-\_\-index}(e) $>$= 0)
\item 
\#define {\bf S\-E\-A\-R\-C\-H\-S\-I\-Z\-E}~30
\item 
\#define {\bf N\-D\-\_\-subtree}(n)~({\bf subtree\-\_\-t}$\ast$){\bf N\-D\-\_\-par}(n)
\item 
\#define {\bf N\-D\-\_\-subtree\-\_\-set}(n, value)~({\bf N\-D\-\_\-par}(n) = ({\bf edge\-\_\-t}$\ast$)value)
\item 
\#define {\bf I\-N\-C\-I\-D\-E\-N\-T}(e, treeset)~((S\-Tset\-Find({\bf agtail}(e),treeset)) != S\-Tset\-Find({\bf aghead}(e),treeset))
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct {\bf subtree\-\_\-s} {\bf subtree\-\_\-t}
\item 
typedef struct {\bf S\-Theap\-\_\-s} {\bf S\-Theap\-\_\-t}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf int} {\bf rank2} ({\bf graph\-\_\-t} $\ast$g, {\bf int} balance, {\bf int} maxiter, {\bf int} search\-\_\-size)
\item 
{\bf int} {\bf rank} ({\bf graph\-\_\-t} $\ast$g, {\bf int} balance, {\bf int} maxiter)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{ns.\-c@{ns.\-c}!I\-N\-C\-I\-D\-E\-N\-T@{I\-N\-C\-I\-D\-E\-N\-T}}
\index{I\-N\-C\-I\-D\-E\-N\-T@{I\-N\-C\-I\-D\-E\-N\-T}!ns.c@{ns.\-c}}
\subsubsection[{I\-N\-C\-I\-D\-E\-N\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define I\-N\-C\-I\-D\-E\-N\-T(
\begin{DoxyParamCaption}
\item[{}]{e, }
\item[{}]{treeset}
\end{DoxyParamCaption}
)~((S\-Tset\-Find({\bf agtail}(e),treeset)) != S\-Tset\-Find({\bf aghead}(e),treeset))}\label{ns_8c_a2554668d7a61fbaa15dbaf2ea1ece722}


Definition at line 339 of file ns.\-c.

\index{ns.\-c@{ns.\-c}!L\-E\-N\-G\-T\-H@{L\-E\-N\-G\-T\-H}}
\index{L\-E\-N\-G\-T\-H@{L\-E\-N\-G\-T\-H}!ns.c@{ns.\-c}}
\subsubsection[{L\-E\-N\-G\-T\-H}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-E\-N\-G\-T\-H(
\begin{DoxyParamCaption}
\item[{}]{e}
\end{DoxyParamCaption}
)~({\bf N\-D\-\_\-rank}({\bf aghead}(e)) -\/ {\bf N\-D\-\_\-rank}({\bf agtail}(e)))}\label{ns_8c_a3826db1db6cebb788ee8ed643b6d9d04}


Definition at line 30 of file ns.\-c.

\index{ns.\-c@{ns.\-c}!N\-D\-\_\-subtree@{N\-D\-\_\-subtree}}
\index{N\-D\-\_\-subtree@{N\-D\-\_\-subtree}!ns.c@{ns.\-c}}
\subsubsection[{N\-D\-\_\-subtree}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-D\-\_\-subtree(
\begin{DoxyParamCaption}
\item[{}]{n}
\end{DoxyParamCaption}
)~({\bf subtree\-\_\-t}$\ast$){\bf N\-D\-\_\-par}(n)}\label{ns_8c_a9f403dbcc1fda1f3b55f5c9b537d2ffc}


Definition at line 259 of file ns.\-c.

\index{ns.\-c@{ns.\-c}!N\-D\-\_\-subtree\-\_\-set@{N\-D\-\_\-subtree\-\_\-set}}
\index{N\-D\-\_\-subtree\-\_\-set@{N\-D\-\_\-subtree\-\_\-set}!ns.c@{ns.\-c}}
\subsubsection[{N\-D\-\_\-subtree\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}\#define N\-D\-\_\-subtree\-\_\-set(
\begin{DoxyParamCaption}
\item[{}]{n, }
\item[{}]{value}
\end{DoxyParamCaption}
)~({\bf N\-D\-\_\-par}(n) = ({\bf edge\-\_\-t}$\ast$)value)}\label{ns_8c_a8298233ef01cc2f6ae17bf7d784e408e}


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

\index{ns.\-c@{ns.\-c}!S\-E\-A\-R\-C\-H\-S\-I\-Z\-E@{S\-E\-A\-R\-C\-H\-S\-I\-Z\-E}}
\index{S\-E\-A\-R\-C\-H\-S\-I\-Z\-E@{S\-E\-A\-R\-C\-H\-S\-I\-Z\-E}!ns.c@{ns.\-c}}
\subsubsection[{S\-E\-A\-R\-C\-H\-S\-I\-Z\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-E\-A\-R\-C\-H\-S\-I\-Z\-E~30}\label{ns_8c_a2b8214fb6ff6b742d38af85968e3e604}


Definition at line 41 of file ns.\-c.



Referenced by rank(), and rank2().

\index{ns.\-c@{ns.\-c}!S\-E\-Q@{S\-E\-Q}}
\index{S\-E\-Q@{S\-E\-Q}!ns.c@{ns.\-c}}
\subsubsection[{S\-E\-Q}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-E\-Q(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b, }
\item[{}]{c}
\end{DoxyParamCaption}
)~(((a) $<$= (b)) \&\& ((b) $<$= (c)))}\label{ns_8c_a70fa32ad4e137195fbff9f2655ce1104}


Definition at line 32 of file ns.\-c.

\index{ns.\-c@{ns.\-c}!S\-L\-A\-C\-K@{S\-L\-A\-C\-K}}
\index{S\-L\-A\-C\-K@{S\-L\-A\-C\-K}!ns.c@{ns.\-c}}
\subsubsection[{S\-L\-A\-C\-K}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-L\-A\-C\-K(
\begin{DoxyParamCaption}
\item[{}]{e}
\end{DoxyParamCaption}
)~({\bf L\-E\-N\-G\-T\-H}(e) -\/ {\bf E\-D\-\_\-minlen}(e))}\label{ns_8c_ad567f863c3031f2cb89ac40e6dfd2c3c}


Definition at line 31 of file ns.\-c.

\index{ns.\-c@{ns.\-c}!T\-R\-E\-E\-\_\-\-E\-D\-G\-E@{T\-R\-E\-E\-\_\-\-E\-D\-G\-E}}
\index{T\-R\-E\-E\-\_\-\-E\-D\-G\-E@{T\-R\-E\-E\-\_\-\-E\-D\-G\-E}!ns.c@{ns.\-c}}
\subsubsection[{T\-R\-E\-E\-\_\-\-E\-D\-G\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define T\-R\-E\-E\-\_\-\-E\-D\-G\-E(
\begin{DoxyParamCaption}
\item[{}]{e}
\end{DoxyParamCaption}
)~({\bf E\-D\-\_\-tree\-\_\-index}(e) $>$= 0)}\label{ns_8c_a891b06f39a59a1763a1efb4c98049d84}


Definition at line 33 of file ns.\-c.



\subsection{Typedef Documentation}
\index{ns.\-c@{ns.\-c}!S\-Theap\-\_\-t@{S\-Theap\-\_\-t}}
\index{S\-Theap\-\_\-t@{S\-Theap\-\_\-t}!ns.c@{ns.\-c}}
\subsubsection[{S\-Theap\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf S\-Theap\-\_\-s}  {\bf S\-Theap\-\_\-t}}\label{ns_8c_a57ad4ee7f891752c1b368575965f0651}
\index{ns.\-c@{ns.\-c}!subtree\-\_\-t@{subtree\-\_\-t}}
\index{subtree\-\_\-t@{subtree\-\_\-t}!ns.c@{ns.\-c}}
\subsubsection[{subtree\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf subtree\-\_\-s}  {\bf subtree\-\_\-t}}\label{ns_8c_a81faaa52b62894b5bfc81e3168844738}


\subsection{Function Documentation}
\index{ns.\-c@{ns.\-c}!rank@{rank}}
\index{rank@{rank}!ns.c@{ns.\-c}}
\subsubsection[{rank}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} rank (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g, }
\item[{{\bf int}}]{balance, }
\item[{{\bf int}}]{maxiter}
\end{DoxyParamCaption}
)}\label{ns_8c_a2a63e2eb1f0bbc77675ae08951e70d9e}


Definition at line 866 of file ns.\-c.



References agget(), rank2(), and S\-E\-A\-R\-C\-H\-S\-I\-Z\-E.



Referenced by dot\-\_\-position(), rank1(), and size\-Array().

\index{ns.\-c@{ns.\-c}!rank2@{rank2}}
\index{rank2@{rank2}!ns.c@{ns.\-c}}
\subsubsection[{rank2}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} rank2 (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g, }
\item[{{\bf int}}]{balance, }
\item[{{\bf int}}]{maxiter, }
\item[{{\bf int}}]{search\-\_\-size}
\end{DoxyParamCaption}
)}\label{ns_8c_af1137ae415a4dea4cb50014c0f9ddedd}


Definition at line 794 of file ns.\-c.



References elapsed\-\_\-sec(), S\-E\-A\-R\-C\-H\-S\-I\-Z\-E, start\-\_\-timer(), and Verbose.



Referenced by rank().

