\section{lib/neatogen/kkutils.h File Reference}
\label{kkutils_8h}\index{lib/neatogen/kkutils.\-h@{lib/neatogen/kkutils.\-h}}
{\ttfamily \#include \char`\"{}defs.\-h\char`\"{}}\\*
Include dependency graph for kkutils.\-h\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{kkutils_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{kkutils_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted} ({\bf vtx\-\_\-data} $\ast$, {\bf int} vtx, {\bf int} $\ast$vtx\-\_\-vec)
\item 
{\bf int} {\bf common\-\_\-neighbors} ({\bf vtx\-\_\-data} $\ast$, {\bf int} v, {\bf int} u, {\bf int} $\ast$)
\item 
void {\bf empty\-\_\-neighbors\-\_\-vec} ({\bf vtx\-\_\-data} $\ast${\bf graph}, {\bf int} vtx, {\bf int} $\ast$vtx\-\_\-vec)
\item 
{\bf Dist\-Type} $\ast$$\ast$ {\bf compute\-\_\-apsp} ({\bf vtx\-\_\-data} $\ast$, {\bf int})
\item 
{\bf Dist\-Type} $\ast$$\ast$ {\bf compute\-\_\-apsp\-\_\-artifical\-\_\-weights} ({\bf vtx\-\_\-data} $\ast$, {\bf int})
\item 
double {\bf distance\-\_\-k\-D} (double $\ast$$\ast$, {\bf int}, {\bf int}, {\bf int})
\item 
void {\bf quicksort\-\_\-place} (double $\ast$, {\bf int} $\ast$, {\bf int}, {\bf int})
\item 
void {\bf quicksort\-\_\-placef} (float $\ast$, {\bf int} $\ast$, {\bf int}, {\bf int})
\item 
void {\bf compute\-\_\-new\-\_\-weights} ({\bf vtx\-\_\-data} $\ast${\bf graph}, {\bf int} n)
\item 
void {\bf restore\-\_\-old\-\_\-weights} ({\bf vtx\-\_\-data} $\ast${\bf graph}, {\bf int} n, float $\ast$old\-\_\-weights)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{kkutils.\-h@{kkutils.\-h}!K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-@{K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-}}
\index{K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-@{K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-}!kkutils.h@{kkutils.\-h}}
\subsubsection[{K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}\#define K\-K\-U\-T\-I\-L\-S\-\_\-\-H\-\_\-}\label{kkutils_8h_ac7e6bebe8b0fdc32498d1375e995cb18}


Definition at line 21 of file kkutils.\-h.



\subsection{Function Documentation}
\index{kkutils.\-h@{kkutils.\-h}!common\-\_\-neighbors@{common\-\_\-neighbors}}
\index{common\-\_\-neighbors@{common\-\_\-neighbors}!kkutils.h@{kkutils.\-h}}
\subsubsection[{common\-\_\-neighbors}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} common\-\_\-neighbors (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{, }
\item[{{\bf int}}]{v, }
\item[{{\bf int}}]{u, }
\item[{{\bf int} $\ast$}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a2f9ea8d8dadf5ed7dbead29833ddaf90}


Definition at line 21 of file kkutils.\-c.



References vtx\-\_\-data\-::edges, and vtx\-\_\-data\-::nedges.



Referenced by compute\-\_\-apsp\-\_\-artifical\-\_\-weights\-\_\-packed(), and compute\-\_\-new\-\_\-weights().

\index{kkutils.\-h@{kkutils.\-h}!compute\-\_\-apsp@{compute\-\_\-apsp}}
\index{compute\-\_\-apsp@{compute\-\_\-apsp}!kkutils.h@{kkutils.\-h}}
\subsubsection[{compute\-\_\-apsp}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Dist\-Type}$\ast$$\ast$ compute\-\_\-apsp (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{, }
\item[{{\bf int}}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_ad09c7f4bb6702d523c6b0e37b1520d00}


Definition at line 97 of file kkutils.\-c.



References vtx\-\_\-data\-::ewgts.

\index{kkutils.\-h@{kkutils.\-h}!compute\-\_\-apsp\-\_\-artifical\-\_\-weights@{compute\-\_\-apsp\-\_\-artifical\-\_\-weights}}
\index{compute\-\_\-apsp\-\_\-artifical\-\_\-weights@{compute\-\_\-apsp\-\_\-artifical\-\_\-weights}!kkutils.h@{kkutils.\-h}}
\subsubsection[{compute\-\_\-apsp\-\_\-artifical\-\_\-weights}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Dist\-Type}$\ast$$\ast$ compute\-\_\-apsp\-\_\-artifical\-\_\-weights (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{, }
\item[{{\bf int}}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a415db05257ff8cb513316923170dd042}


Definition at line 105 of file kkutils.\-c.



References compute\-\_\-new\-\_\-weights(), vtx\-\_\-data\-::ewgts, and restore\-\_\-old\-\_\-weights().

\index{kkutils.\-h@{kkutils.\-h}!compute\-\_\-new\-\_\-weights@{compute\-\_\-new\-\_\-weights}}
\index{compute\-\_\-new\-\_\-weights@{compute\-\_\-new\-\_\-weights}!kkutils.h@{kkutils.\-h}}
\subsubsection[{compute\-\_\-new\-\_\-weights}]{\setlength{\rightskip}{0pt plus 5cm}void compute\-\_\-new\-\_\-weights (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{graph, }
\item[{{\bf int}}]{n}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a4de649627e34d65ed2bf5c4fbda8ec0c}


Definition at line 242 of file kkutils.\-c.



References common\-\_\-neighbors(), vtx\-\_\-data\-::edges, empty\-\_\-neighbors\-\_\-vec(), vtx\-\_\-data\-::ewgts, fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted(), N\-\_\-\-G\-N\-E\-W, and vtx\-\_\-data\-::nedges.



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

\index{kkutils.\-h@{kkutils.\-h}!distance\-\_\-k\-D@{distance\-\_\-k\-D}}
\index{distance\-\_\-k\-D@{distance\-\_\-k\-D}!kkutils.h@{kkutils.\-h}}
\subsubsection[{distance\-\_\-k\-D}]{\setlength{\rightskip}{0pt plus 5cm}double distance\-\_\-k\-D (
\begin{DoxyParamCaption}
\item[{double $\ast$$\ast$}]{, }
\item[{{\bf int}}]{, }
\item[{{\bf int}}]{, }
\item[{{\bf int}}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_adc2cf041115bad13198e773adc032855}


Definition at line 171 of file kkutils.\-c.

\index{kkutils.\-h@{kkutils.\-h}!empty\-\_\-neighbors\-\_\-vec@{empty\-\_\-neighbors\-\_\-vec}}
\index{empty\-\_\-neighbors\-\_\-vec@{empty\-\_\-neighbors\-\_\-vec}!kkutils.h@{kkutils.\-h}}
\subsubsection[{empty\-\_\-neighbors\-\_\-vec}]{\setlength{\rightskip}{0pt plus 5cm}void empty\-\_\-neighbors\-\_\-vec (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{graph, }
\item[{{\bf int}}]{vtx, }
\item[{{\bf int} $\ast$}]{vtx\-\_\-vec}
\end{DoxyParamCaption}
)}\label{kkutils_8h_ad915f54c8b6bb4028b47e8c6f0496aee}


Definition at line 46 of file kkutils.\-c.



References vtx\-\_\-data\-::edges, and vtx\-\_\-data\-::nedges.



Referenced by compute\-\_\-apsp\-\_\-artifical\-\_\-weights\-\_\-packed(), and compute\-\_\-new\-\_\-weights().

\index{kkutils.\-h@{kkutils.\-h}!fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted@{fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted}}
\index{fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted@{fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted}!kkutils.h@{kkutils.\-h}}
\subsubsection[{fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted}]{\setlength{\rightskip}{0pt plus 5cm}void fill\-\_\-neighbors\-\_\-vec\-\_\-unweighted (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{, }
\item[{{\bf int}}]{vtx, }
\item[{{\bf int} $\ast$}]{vtx\-\_\-vec}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a81ad9c8a21ff518b3fade60113a954c6}


Definition at line 36 of file kkutils.\-c.



References vtx\-\_\-data\-::edges, and vtx\-\_\-data\-::nedges.



Referenced by compute\-\_\-apsp\-\_\-artifical\-\_\-weights\-\_\-packed(), and compute\-\_\-new\-\_\-weights().

\index{kkutils.\-h@{kkutils.\-h}!quicksort\-\_\-place@{quicksort\-\_\-place}}
\index{quicksort\-\_\-place@{quicksort\-\_\-place}!kkutils.h@{kkutils.\-h}}
\subsubsection[{quicksort\-\_\-place}]{\setlength{\rightskip}{0pt plus 5cm}void quicksort\-\_\-place (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{, }
\item[{{\bf int} $\ast$}]{, }
\item[{{\bf int}}]{, }
\item[{{\bf int}}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a9f9bcb642a69744891b047b76ebabb48}


Definition at line 219 of file kkutils.\-c.



References quicksort\-\_\-place().



Referenced by quicksort\-\_\-place().

\index{kkutils.\-h@{kkutils.\-h}!quicksort\-\_\-placef@{quicksort\-\_\-placef}}
\index{quicksort\-\_\-placef@{quicksort\-\_\-placef}!kkutils.h@{kkutils.\-h}}
\subsubsection[{quicksort\-\_\-placef}]{\setlength{\rightskip}{0pt plus 5cm}void quicksort\-\_\-placef (
\begin{DoxyParamCaption}
\item[{float $\ast$}]{, }
\item[{{\bf int} $\ast$}]{, }
\item[{{\bf int}}]{, }
\item[{{\bf int}}]{}
\end{DoxyParamCaption}
)}\label{kkutils_8h_a7f226b019cd307102ce5102ed7eba0d5}


Definition at line 194 of file kkutils.\-c.

\index{kkutils.\-h@{kkutils.\-h}!restore\-\_\-old\-\_\-weights@{restore\-\_\-old\-\_\-weights}}
\index{restore\-\_\-old\-\_\-weights@{restore\-\_\-old\-\_\-weights}!kkutils.h@{kkutils.\-h}}
\subsubsection[{restore\-\_\-old\-\_\-weights}]{\setlength{\rightskip}{0pt plus 5cm}void restore\-\_\-old\-\_\-weights (
\begin{DoxyParamCaption}
\item[{{\bf vtx\-\_\-data} $\ast$}]{graph, }
\item[{{\bf int}}]{n, }
\item[{float $\ast$}]{old\-\_\-weights}
\end{DoxyParamCaption}
)}\label{kkutils_8h_aafb1f9b1beaf204b88244f19189d088d}


Definition at line 279 of file kkutils.\-c.



References vtx\-\_\-data\-::ewgts, vtx\-\_\-data\-::nedges, and N\-U\-L\-L.



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

