\section{lib/neatogen/neatoinit.c File Reference}
\label{neatoinit_8c}\index{lib/neatogen/neatoinit.\-c@{lib/neatogen/neatoinit.\-c}}
{\ttfamily \#include \char`\"{}config.\-h\char`\"{}}\\*
{\ttfamily \#include $<$time.\-h$>$}\\*
{\ttfamily \#include $<$unistd.\-h$>$}\\*
{\ttfamily \#include $<$ctype.\-h$>$}\\*
{\ttfamily \#include \char`\"{}neato.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}pack.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}stress.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}kkutils.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}pointset.\-h\char`\"{}}\\*
Include dependency graph for neatoinit.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{neatoinit_8c__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf srand48}~srand
\item 
\#define {\bf B\-S}~\char`\"{}\%lf,\%lf,\%lf,\%lf\char`\"{}
\item 
\#define {\bf S\-L\-E\-N}({\bf s})~(sizeof({\bf s})-\/1)
\item 
\#define {\bf S\-M\-A\-R\-T}~\char`\"{}self\char`\"{}
\item 
\#define {\bf R\-E\-G\-U\-L\-A\-R}~\char`\"{}regular\char`\"{}
\item 
\#define {\bf R\-A\-N\-D\-O\-M}~\char`\"{}random\char`\"{}
\item 
\#define {\bf exp\-\_\-name}~\char`\"{}stresswt\char`\"{}
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum {\bf pos\-\_\-edge} \{ {\bf No\-Edges}, 
{\bf Some\-Edges}, 
{\bf All\-Edges}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf neato\-\_\-init\-\_\-node} ({\bf node\-\_\-t} $\ast$n)
\item 
{\bf int} {\bf user\-\_\-pos} ({\bf attrsym\-\_\-t} $\ast$posptr, {\bf attrsym\-\_\-t} $\ast$pinptr, {\bf node\-\_\-t} $\ast$np, {\bf int} n\-G)
\item 
void {\bf neato\-\_\-cleanup} ({\bf graph\-\_\-t} $\ast$g)
\item 
{\bf int} {\bf init\-\_\-nop} ({\bf Agraph\-\_\-t} $\ast$g, {\bf int} adjust)
\item 
{\bf int} {\bf set\-Seed} ({\bf graph\-\_\-t} $\ast$G, {\bf int} dflt, long $\ast$seedp)
\item 
{\bf int} {\bf check\-Start} ({\bf graph\-\_\-t} $\ast$G, {\bf int} n\-G, {\bf int} dflt)
\item 
void {\bf neato\-\_\-layout} ({\bf Agraph\-\_\-t} $\ast$g)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{neatoinit.\-c@{neatoinit.\-c}!B\-S@{B\-S}}
\index{B\-S@{B\-S}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{B\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define B\-S~\char`\"{}\%lf,\%lf,\%lf,\%lf\char`\"{}}\label{neatoinit_8c_a580a88f98668df1ac5e1683cae31c0b3}


Definition at line 425 of file neatoinit.\-c.

\index{neatoinit.\-c@{neatoinit.\-c}!exp\-\_\-name@{exp\-\_\-name}}
\index{exp\-\_\-name@{exp\-\_\-name}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{exp\-\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}\#define exp\-\_\-name~\char`\"{}stresswt\char`\"{}}\label{neatoinit_8c_adb480b1dff6fc774a21e596d5980bb77}


Definition at line 1003 of file neatoinit.\-c.

\index{neatoinit.\-c@{neatoinit.\-c}!R\-A\-N\-D\-O\-M@{R\-A\-N\-D\-O\-M}}
\index{R\-A\-N\-D\-O\-M@{R\-A\-N\-D\-O\-M}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{R\-A\-N\-D\-O\-M}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-A\-N\-D\-O\-M~\char`\"{}random\char`\"{}}\label{neatoinit_8c_a724484a23cab81c63f4c7f9136a70371}


Definition at line 946 of file neatoinit.\-c.



Referenced by set\-Seed().

\index{neatoinit.\-c@{neatoinit.\-c}!R\-E\-G\-U\-L\-A\-R@{R\-E\-G\-U\-L\-A\-R}}
\index{R\-E\-G\-U\-L\-A\-R@{R\-E\-G\-U\-L\-A\-R}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{R\-E\-G\-U\-L\-A\-R}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-E\-G\-U\-L\-A\-R~\char`\"{}regular\char`\"{}}\label{neatoinit_8c_a9988ccc764be87fa1a8280b60d9e28c6}


Definition at line 945 of file neatoinit.\-c.



Referenced by set\-Seed().

\index{neatoinit.\-c@{neatoinit.\-c}!S\-L\-E\-N@{S\-L\-E\-N}}
\index{S\-L\-E\-N@{S\-L\-E\-N}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{S\-L\-E\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-L\-E\-N(
\begin{DoxyParamCaption}
\item[{}]{{\bf s}}
\end{DoxyParamCaption}
)~(sizeof({\bf s})-\/1)}\label{neatoinit_8c_aceb308156e5ca2b43865632ca309f14c}


Definition at line 943 of file neatoinit.\-c.



Referenced by set\-Seed().

\index{neatoinit.\-c@{neatoinit.\-c}!S\-M\-A\-R\-T@{S\-M\-A\-R\-T}}
\index{S\-M\-A\-R\-T@{S\-M\-A\-R\-T}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{S\-M\-A\-R\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-M\-A\-R\-T~\char`\"{}self\char`\"{}}\label{neatoinit_8c_ab3522e1d3c571b555ef87ba6aa42fed1}


Definition at line 944 of file neatoinit.\-c.



Referenced by set\-Seed().

\index{neatoinit.\-c@{neatoinit.\-c}!srand48@{srand48}}
\index{srand48@{srand48}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{srand48}]{\setlength{\rightskip}{0pt plus 5cm}\#define srand48~srand}\label{neatoinit_8c_a2f2b3fa4b115701da12b3d1cdf02122e}


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



Referenced by check\-Start().



\subsection{Enumeration Type Documentation}
\index{neatoinit.\-c@{neatoinit.\-c}!pos\-\_\-edge@{pos\-\_\-edge}}
\index{pos\-\_\-edge@{pos\-\_\-edge}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{pos\-\_\-edge}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf pos\-\_\-edge}}\label{neatoinit_8c_a15d946c738350407da93b09b05941121}
\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{No\-Edges@{No\-Edges}!neatoinit.\-c@{neatoinit.\-c}}\index{neatoinit.\-c@{neatoinit.\-c}!No\-Edges@{No\-Edges}}\item[{\em 
No\-Edges\label{neatoinit_8c_a15d946c738350407da93b09b05941121a6d67576e7b66313d09243f776be17357}
}]\index{Some\-Edges@{Some\-Edges}!neatoinit.\-c@{neatoinit.\-c}}\index{neatoinit.\-c@{neatoinit.\-c}!Some\-Edges@{Some\-Edges}}\item[{\em 
Some\-Edges\label{neatoinit_8c_a15d946c738350407da93b09b05941121a5c485397697831e1453a38740b0e25ae}
}]\index{All\-Edges@{All\-Edges}!neatoinit.\-c@{neatoinit.\-c}}\index{neatoinit.\-c@{neatoinit.\-c}!All\-Edges@{All\-Edges}}\item[{\em 
All\-Edges\label{neatoinit_8c_a15d946c738350407da93b09b05941121aea7428626c73618f0ab561703d7bbc61}
}]\end{description}
\end{Desc}


Definition at line 366 of file neatoinit.\-c.



\subsection{Function Documentation}
\index{neatoinit.\-c@{neatoinit.\-c}!check\-Start@{check\-Start}}
\index{check\-Start@{check\-Start}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{check\-Start}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} check\-Start (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{G, }
\item[{{\bf int}}]{n\-G, }
\item[{{\bf int}}]{dflt}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_ad1276e4efa90d8017cceb426dba5c482}


Definition at line 1025 of file neatoinit.\-c.



References agerr(), A\-G\-W\-A\-R\-N, I\-N\-I\-T\-\_\-\-R\-A\-N\-D\-O\-M, I\-N\-I\-T\-\_\-\-R\-E\-G\-U\-L\-A\-R, set\-Seed(), and srand48.



Referenced by initial\-\_\-positions().

\index{neatoinit.\-c@{neatoinit.\-c}!init\-\_\-nop@{init\-\_\-nop}}
\index{init\-\_\-nop@{init\-\_\-nop}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{init\-\_\-nop}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} init\-\_\-nop (
\begin{DoxyParamCaption}
\item[{{\bf Agraph\-\_\-t} $\ast$}]{g, }
\item[{{\bf int}}]{adjust}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_a73d0bc87c8cdf0b2cb554dd0ace6a26c}


Definition at line 528 of file neatoinit.\-c.



References adjust\-Nodes(), agattr(), agerr(), A\-G\-E\-R\-R, agfindgraphattr, agfstnode(), agget(), agnameof(), agnxtnode(), A\-G\-R\-A\-P\-H, All\-Edges, compute\-\_\-bb(), F\-A\-L\-S\-E, G\-D\-\_\-bb, G\-D\-\_\-drawing, G\-D\-\_\-label, G\-D\-\_\-neato\-\_\-nlist, G\-V\-S\-P\-L\-I\-N\-E\-S, has\-Pos, map\-Bool(), N\-D\-\_\-coord, N\-D\-\_\-pos, N\-D\-\_\-xlabel, neato\-\_\-set\-\_\-aspect(), neato\-\_\-translate(), No\-Edges, Nop, P\-O\-I\-N\-T\-S\-\_\-\-P\-E\-R\-\_\-\-I\-N\-C\-H, R\-\_\-\-N\-O\-N\-E, scan\-\_\-graph(), spline\-\_\-edges0(), State, and xdot\-B\-B().



Referenced by neato\-\_\-layout().

\index{neatoinit.\-c@{neatoinit.\-c}!neato\-\_\-cleanup@{neato\-\_\-cleanup}}
\index{neato\-\_\-cleanup@{neato\-\_\-cleanup}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{neato\-\_\-cleanup}]{\setlength{\rightskip}{0pt plus 5cm}void neato\-\_\-cleanup (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{g}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_ac4d7835090abfdac0d58a82a9a4a7e59}


Definition at line 142 of file neatoinit.\-c.



References agfstnode(), agfstout(), agnxtnode(), agnxtout(), gv\-\_\-cleanup\-\_\-edge(), and gv\-\_\-cleanup\-\_\-node().

\index{neatoinit.\-c@{neatoinit.\-c}!neato\-\_\-init\-\_\-node@{neato\-\_\-init\-\_\-node}}
\index{neato\-\_\-init\-\_\-node@{neato\-\_\-init\-\_\-node}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{neato\-\_\-init\-\_\-node}]{\setlength{\rightskip}{0pt plus 5cm}void neato\-\_\-init\-\_\-node (
\begin{DoxyParamCaption}
\item[{{\bf node\-\_\-t} $\ast$}]{n}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_af6531fc31fd878bf193f9b8b4a290643}


Definition at line 42 of file neatoinit.\-c.



References agbindrec(), agraphof(), common\-\_\-init\-\_\-node(), G\-D\-\_\-flip, G\-D\-\_\-ndim, gv\-\_\-nodesize(), N\-\_\-\-N\-E\-W, N\-D\-\_\-pos, and T\-R\-U\-E.

\index{neatoinit.\-c@{neatoinit.\-c}!neato\-\_\-layout@{neato\-\_\-layout}}
\index{neato\-\_\-layout@{neato\-\_\-layout}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{neato\-\_\-layout}]{\setlength{\rightskip}{0pt plus 5cm}void neato\-\_\-layout (
\begin{DoxyParamCaption}
\item[{{\bf Agraph\-\_\-t} $\ast$}]{g}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_ad7a61ee5da1b8489b5af6d5635d6d351}


Definition at line 1407 of file neatoinit.\-c.



References agdelete(), agdelrec(), agerr(), agget(), A\-G\-P\-R\-E\-V, C\-L\-\_\-\-O\-F\-F\-S\-E\-T, compute\-\_\-bb(), pack\-\_\-info\-::do\-Splines, E\-T\-\_\-\-L\-I\-N\-E, F\-A\-L\-S\-E, pack\-\_\-info\-::fixed, free\-\_\-scan\-\_\-graph(), get\-\_\-inputscale(), get\-Pack(), get\-Pack\-Mode\-Info(), graph\-Adjust\-Mode(), gv\-\_\-postprocess(), init\-\_\-nop(), l\-\_\-node, l\-\_\-undef, map\-Bool(), pack\-\_\-info\-::margin, pack\-\_\-info\-::mode, N\-\_\-\-N\-E\-W, node\-Induce(), Nop, pack\-Graphs(), pccomps(), P\-O\-I\-N\-T\-S\-\_\-\-P\-E\-R\-\_\-\-I\-N\-C\-H, P\-Sinputscale, remove\-Overlap\-With(), set\-Edge\-Type(), spline\-\_\-edges(), and T\-R\-U\-E.

\index{neatoinit.\-c@{neatoinit.\-c}!set\-Seed@{set\-Seed}}
\index{set\-Seed@{set\-Seed}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{set\-Seed}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} set\-Seed (
\begin{DoxyParamCaption}
\item[{{\bf graph\-\_\-t} $\ast$}]{G, }
\item[{{\bf int}}]{dflt, }
\item[{long $\ast$}]{seedp}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_ad8f821cf0e7829c9ebce1a5ab5ce15c7}


Definition at line 958 of file neatoinit.\-c.



References agget(), agset(), I\-N\-I\-T\-\_\-\-R\-A\-N\-D\-O\-M, I\-N\-I\-T\-\_\-\-R\-E\-G\-U\-L\-A\-R, I\-N\-I\-T\-\_\-\-S\-E\-L\-F, N\-U\-L\-L, R\-A\-N\-D\-O\-M, R\-E\-G\-U\-L\-A\-R, S\-L\-E\-N, and S\-M\-A\-R\-T.



Referenced by check\-Start(), and fdp\-\_\-init\-Params().

\index{neatoinit.\-c@{neatoinit.\-c}!user\-\_\-pos@{user\-\_\-pos}}
\index{user\-\_\-pos@{user\-\_\-pos}!neatoinit.c@{neatoinit.\-c}}
\subsubsection[{user\-\_\-pos}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} user\-\_\-pos (
\begin{DoxyParamCaption}
\item[{{\bf attrsym\-\_\-t} $\ast$}]{posptr, }
\item[{{\bf attrsym\-\_\-t} $\ast$}]{pinptr, }
\item[{{\bf node\-\_\-t} $\ast$}]{np, }
\item[{{\bf int}}]{n\-G}
\end{DoxyParamCaption}
)}\label{neatoinit_8c_a54b9f639c4d9167658867e0aebdda16b}


Definition at line 57 of file neatoinit.\-c.



References agerr(), A\-G\-E\-R\-R, agnameof(), agxget(), F\-A\-L\-S\-E, jitter3d(), jitter\-\_\-d(), mapbool(), N\-\_\-z, N\-D\-\_\-pinned, N\-D\-\_\-pos, Ndim, N\-U\-L\-L, P\-\_\-\-P\-I\-N, P\-\_\-\-S\-E\-T, P\-Sinputscale, and T\-R\-U\-E.

