\section{lib/sparse/\-Quad\-Tree.h File Reference}
\label{QuadTree_8h}\index{lib/sparse/\-Quad\-Tree.\-h@{lib/sparse/\-Quad\-Tree.\-h}}
{\ttfamily \#include \char`\"{}Linked\-List.\-h\char`\"{}}\\*
{\ttfamily \#include $<$stdio.\-h$>$}\\*
Include dependency graph for Quad\-Tree.\-h\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=178pt]{QuadTree_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=268pt]{QuadTree_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf Quad\-Tree\-\_\-struct}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct {\bf Quad\-Tree\-\_\-struct} $\ast$ {\bf Quad\-Tree}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Quad\-Tree} {\bf Quad\-Tree\-\_\-new} ({\bf int} dim, {\bf real} $\ast$center, {\bf real} width, {\bf int} max\-\_\-level)
\item 
void {\bf Quad\-Tree\-\_\-delete} ({\bf Quad\-Tree} q)
\item 
{\bf Quad\-Tree} {\bf Quad\-Tree\-\_\-add} ({\bf Quad\-Tree} q, {\bf real} $\ast${\bf coord}, {\bf real} weight, {\bf int} id)
\item 
void {\bf Quad\-Tree\-\_\-print} (F\-I\-L\-E $\ast$fp, {\bf Quad\-Tree} q)
\item 
{\bf Quad\-Tree} {\bf Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list} ({\bf int} dim, {\bf int} n, {\bf int} max\-\_\-level, {\bf real} $\ast${\bf coord}, {\bf real} $\ast$weight)
\item 
{\bf real} {\bf point\-\_\-distance} ({\bf real} $\ast$p1, {\bf real} $\ast$p2, {\bf int} dim)
\item 
void {\bf Quad\-Tree\-\_\-get\-\_\-supernodes} ({\bf Quad\-Tree} qt, {\bf real} bh, {\bf real} $\ast${\bf point}, {\bf int} nodeid, {\bf int} $\ast$nsuper, {\bf int} $\ast$nsupermax, {\bf real} $\ast$$\ast$center, {\bf real} $\ast$$\ast$supernode\-\_\-wgts, {\bf real} $\ast$$\ast$distances, {\bf real} $\ast$counts, {\bf int} $\ast$flag)
\item 
void {\bf Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force} ({\bf Quad\-Tree} qt, {\bf real} $\ast$force, {\bf real} $\ast$x, {\bf real} bh, {\bf real} p, {\bf real} K\-P, {\bf real} $\ast$counts, {\bf int} $\ast$flag)
\item 
void {\bf Quad\-Tree\-\_\-get\-\_\-nearest} ({\bf Quad\-Tree} qt, {\bf real} $\ast$x, {\bf real} $\ast${\bf ymin}, {\bf int} $\ast$imin, {\bf real} $\ast$min, {\bf int} $\ast$flag)
\item 
{\bf Quad\-Tree} {\bf Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant} ({\bf int} dim, {\bf real} $\ast$center, {\bf real} width, {\bf int} max\-\_\-level, {\bf int} i)
\end{DoxyCompactItemize}


\subsection{Typedef Documentation}
\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree@{Quad\-Tree}}
\index{Quad\-Tree@{Quad\-Tree}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf Quad\-Tree\-\_\-struct}$\ast$ {\bf Quad\-Tree}}\label{QuadTree_8h_a82f2a3c63bb221aca9d92ef8745c01e1}


Definition at line 21 of file Quad\-Tree.\-h.



\subsection{Function Documentation}
\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!point\-\_\-distance@{point\-\_\-distance}}
\index{point\-\_\-distance@{point\-\_\-distance}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{point\-\_\-distance}]{\setlength{\rightskip}{0pt plus 5cm}{\bf real} point\-\_\-distance (
\begin{DoxyParamCaption}
\item[{{\bf real} $\ast$}]{p1, }
\item[{{\bf real} $\ast$}]{p2, }
\item[{{\bf int}}]{dim}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_ae4cc19c24bd9e799452756b8f452b109}


Definition at line 291 of file general.\-c.



References dist(), and real.



Referenced by Quad\-Tree\-\_\-get\-\_\-supernodes\-\_\-internal().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-add@{Quad\-Tree\-\_\-add}}
\index{Quad\-Tree\-\_\-add@{Quad\-Tree\-\_\-add}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Quad\-Tree} Quad\-Tree\-\_\-add (
\begin{DoxyParamCaption}
\item[{{\bf Quad\-Tree}}]{q, }
\item[{{\bf real} $\ast$}]{coord, }
\item[{{\bf real}}]{weight, }
\item[{{\bf int}}]{id}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_ad12151ea913e8deec1bdfb50af1c401a}


Definition at line 554 of file Quad\-Tree.\-c.



Referenced by Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-delete@{Quad\-Tree\-\_\-delete}}
\index{Quad\-Tree\-\_\-delete@{Quad\-Tree\-\_\-delete}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-delete}]{\setlength{\rightskip}{0pt plus 5cm}void Quad\-Tree\-\_\-delete (
\begin{DoxyParamCaption}
\item[{{\bf Quad\-Tree}}]{q}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_acb971384588ccbdb0d4a52ac1de829dc}


Definition at line 421 of file Quad\-Tree.\-c.



References Quad\-Tree\-\_\-struct\-::average, Quad\-Tree\-\_\-struct\-::center, Quad\-Tree\-\_\-struct\-::data, Quad\-Tree\-\_\-struct\-::dim, F\-R\-E\-E, Quad\-Tree\-\_\-struct\-::l, node\-\_\-data\-\_\-delete(), Quad\-Tree\-\_\-struct\-::qts, Quad\-Tree\-\_\-delete(), and Single\-Linked\-List\-\_\-delete().



Referenced by Quad\-Tree\-\_\-delete(), spring\-\_\-electrical\-\_\-embedding(), spring\-\_\-electrical\-\_\-embedding\-\_\-fast(), spring\-\_\-electrical\-\_\-embedding\-\_\-slow(), spring\-\_\-electrical\-\_\-spring\-\_\-embedding(), and spring\-\_\-maxent\-\_\-embedding().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-get\-\_\-nearest@{Quad\-Tree\-\_\-get\-\_\-nearest}}
\index{Quad\-Tree\-\_\-get\-\_\-nearest@{Quad\-Tree\-\_\-get\-\_\-nearest}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-get\-\_\-nearest}]{\setlength{\rightskip}{0pt plus 5cm}void Quad\-Tree\-\_\-get\-\_\-nearest (
\begin{DoxyParamCaption}
\item[{{\bf Quad\-Tree}}]{qt, }
\item[{{\bf real} $\ast$}]{x, }
\item[{{\bf real} $\ast$}]{ymin, }
\item[{{\bf int} $\ast$}]{imin, }
\item[{{\bf real} $\ast$}]{min, }
\item[{{\bf int} $\ast$}]{flag}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_aec93d81afc7a06befeb50ee05917bbe9}


Definition at line 727 of file Quad\-Tree.\-c.



References F\-A\-L\-S\-E, and T\-R\-U\-E.

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force@{Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force}}
\index{Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force@{Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force}]{\setlength{\rightskip}{0pt plus 5cm}void Quad\-Tree\-\_\-get\-\_\-repulsive\-\_\-force (
\begin{DoxyParamCaption}
\item[{{\bf Quad\-Tree}}]{qt, }
\item[{{\bf real} $\ast$}]{force, }
\item[{{\bf real} $\ast$}]{x, }
\item[{{\bf real}}]{bh, }
\item[{{\bf real}}]{p, }
\item[{{\bf real}}]{K\-P, }
\item[{{\bf real} $\ast$}]{counts, }
\item[{{\bf int} $\ast$}]{flag}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_a07059e723fb9cc17044c8f0f8f966747}


Definition at line 317 of file Quad\-Tree.\-c.



References Quad\-Tree\-\_\-struct\-::dim, and Quad\-Tree\-\_\-struct\-::n.



Referenced by spring\-\_\-electrical\-\_\-embedding\-\_\-fast().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-get\-\_\-supernodes@{Quad\-Tree\-\_\-get\-\_\-supernodes}}
\index{Quad\-Tree\-\_\-get\-\_\-supernodes@{Quad\-Tree\-\_\-get\-\_\-supernodes}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-get\-\_\-supernodes}]{\setlength{\rightskip}{0pt plus 5cm}void Quad\-Tree\-\_\-get\-\_\-supernodes (
\begin{DoxyParamCaption}
\item[{{\bf Quad\-Tree}}]{qt, }
\item[{{\bf real}}]{bh, }
\item[{{\bf real} $\ast$}]{point, }
\item[{{\bf int}}]{nodeid, }
\item[{{\bf int} $\ast$}]{nsuper, }
\item[{{\bf int} $\ast$}]{nsupermax, }
\item[{{\bf real} $\ast$$\ast$}]{center, }
\item[{{\bf real} $\ast$$\ast$}]{supernode\-\_\-wgts, }
\item[{{\bf real} $\ast$$\ast$}]{distances, }
\item[{{\bf real} $\ast$}]{counts, }
\item[{{\bf int} $\ast$}]{flag}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_aac4fccbbddab8bee6f4e4052f9def12b}
\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-new@{Quad\-Tree\-\_\-new}}
\index{Quad\-Tree\-\_\-new@{Quad\-Tree\-\_\-new}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Quad\-Tree} Quad\-Tree\-\_\-new (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{dim, }
\item[{{\bf real} $\ast$}]{center, }
\item[{{\bf real}}]{width, }
\item[{{\bf int}}]{max\-\_\-level}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_a3b291a63afd61fec369bd33d8834de86}


Definition at line 402 of file Quad\-Tree.\-c.



References assert, Quad\-Tree\-\_\-struct\-::average, Quad\-Tree\-\_\-struct\-::center, Quad\-Tree\-\_\-struct\-::data, Quad\-Tree\-\_\-struct\-::dim, Quad\-Tree\-\_\-struct\-::l, M\-A\-L\-L\-O\-C, Quad\-Tree\-\_\-struct\-::max\-\_\-level, Quad\-Tree\-\_\-struct\-::n, N\-U\-L\-L, Quad\-Tree\-\_\-struct\-::qts, real, Quad\-Tree\-\_\-struct\-::total\-\_\-weight, and Quad\-Tree\-\_\-struct\-::width.



Referenced by Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list(), and Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list@{Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list}}
\index{Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list@{Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Quad\-Tree} Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{dim, }
\item[{{\bf int}}]{n, }
\item[{{\bf int}}]{max\-\_\-level, }
\item[{{\bf real} $\ast$}]{coord, }
\item[{{\bf real} $\ast$}]{weight}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_a64232f7b2398bbc04bad7ce9d31c264e}


Definition at line 347 of file Quad\-Tree.\-c.



References F\-R\-E\-E, M\-A\-L\-L\-O\-C, M\-A\-X, M\-I\-N, N\-U\-L\-L, Quad\-Tree\-\_\-add(), Quad\-Tree\-\_\-new(), real, xmax, and xmin.



Referenced by spring\-\_\-electrical\-\_\-embedding(), spring\-\_\-electrical\-\_\-embedding\-\_\-fast(), spring\-\_\-electrical\-\_\-embedding\-\_\-slow(), spring\-\_\-electrical\-\_\-spring\-\_\-embedding(), and spring\-\_\-maxent\-\_\-embedding().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant@{Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant}}
\index{Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant@{Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Quad\-Tree} Quad\-Tree\-\_\-new\-\_\-in\-\_\-quadrant (
\begin{DoxyParamCaption}
\item[{{\bf int}}]{dim, }
\item[{{\bf real} $\ast$}]{center, }
\item[{{\bf real}}]{width, }
\item[{{\bf int}}]{max\-\_\-level, }
\item[{{\bf int}}]{i}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_ad1c905313e7c339bf4cc04fcdceee9d7}


Definition at line 455 of file Quad\-Tree.\-c.



References Quad\-Tree\-\_\-struct\-::center, and Quad\-Tree\-\_\-new().

\index{Quad\-Tree.\-h@{Quad\-Tree.\-h}!Quad\-Tree\-\_\-print@{Quad\-Tree\-\_\-print}}
\index{Quad\-Tree\-\_\-print@{Quad\-Tree\-\_\-print}!QuadTree.h@{Quad\-Tree.\-h}}
\subsubsection[{Quad\-Tree\-\_\-print}]{\setlength{\rightskip}{0pt plus 5cm}void Quad\-Tree\-\_\-print (
\begin{DoxyParamCaption}
\item[{F\-I\-L\-E $\ast$}]{fp, }
\item[{{\bf Quad\-Tree}}]{q}
\end{DoxyParamCaption}
)}\label{QuadTree_8h_a48d1e012ff55c26a3a5bf45c41737cef}


Definition at line 654 of file Quad\-Tree.\-c.



References Quad\-Tree\-\_\-struct\-::dim.

