\section{lib/common/arith.h File Reference}
\label{arith_8h}\index{lib/common/arith.\-h@{lib/common/arith.\-h}}
{\ttfamily \#include $<$limits.\-h$>$}\\*
{\ttfamily \#include $<$math.\-h$>$}\\*
Include dependency graph for arith.\-h\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=158pt]{arith_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]{arith_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf \-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E}~1
\item 
\#define {\bf M\-I\-N}(a, b)~((a)$<$(b)?(a)\-:(b))
\item 
\#define {\bf M\-A\-X}(a, b)~((a)$>$(b)?(a)\-:(b))
\item 
\#define {\bf A\-B\-S}(a)~((a) $>$= 0 ? (a) \-: -\/(a))
\item 
\#define {\bf A\-V\-G}(a, b)~((a + b) / 2)
\item 
\#define {\bf S\-G\-N}(a)~(((a)$<$0)? -\/1 \-: 1)
\item 
\#define {\bf C\-M\-P}(a, b)~(((a)$<$(b)) ? -\/1 \-: (((a)$>$(b)) ? 1 \-: 0))
\item 
\#define {\bf I\-N\-T\-\_\-\-M\-A\-X}~(({\bf int})($\sim$(unsigned)0 $>$$>$ 1))
\item 
\#define {\bf I\-N\-T\-\_\-\-M\-I\-N}~(-\/{\bf I\-N\-T\-\_\-\-M\-A\-X} -\/ 1)
\item 
\#define {\bf M\-A\-X\-S\-H\-O\-R\-T}~(0x7fff)
\item 
\#define {\bf M\-A\-X\-D\-O\-U\-B\-L\-E}~1.\-7976931348623157e+308
\item 
\#define {\bf M\-A\-X\-F\-L\-O\-A\-T}~((float)3.\-40282347e+38)
\item 
\#define {\bf B\-E\-T\-W\-E\-E\-N}(a, b, c)~(((a) $<$= (b)) \&\& ((b) $<$= (c)))
\item 
\#define {\bf M\-\_\-\-P\-I}~3.\-14159265358979323846
\item 
\#define {\bf S\-Q\-R\-T2}~1.\-41421356237309504880
\item 
\#define {\bf R\-O\-U\-N\-D}(f)~((f$>$=0)?({\bf int})(f + .\-5)\-:({\bf int})(f -\/ .\-5))
\item 
\#define {\bf R\-A\-D\-I\-A\-N\-S}(deg)~((deg)/180.\-0 $\ast$ {\bf M\-\_\-\-P\-I})
\item 
\#define {\bf D\-E\-G\-R\-E\-E\-S}(rad)~((rad)/{\bf M\-\_\-\-P\-I} $\ast$ 180.\-0)
\item 
\#define {\bf S\-Q\-R}(a)~((a) $\ast$ (a))
\item 
\#define {\bf sincos}(x, {\bf s}, c)~$\ast${\bf s} = sin(x); $\ast$c = cos(x)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{arith.\-h@{arith.\-h}!\-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E@{\-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E}}
\index{\-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E@{\-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E}!arith.h@{arith.\-h}}
\subsubsection[{\-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define \-\_\-\-G\-N\-U\-\_\-\-S\-O\-U\-R\-C\-E~1}\label{arith_8h_a369266c24eacffb87046522897a570d5}


Definition at line 22 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!A\-B\-S@{A\-B\-S}}
\index{A\-B\-S@{A\-B\-S}!arith.h@{arith.\-h}}
\subsubsection[{A\-B\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-B\-S(
\begin{DoxyParamCaption}
\item[{}]{a}
\end{DoxyParamCaption}
)~((a) $>$= 0 ? (a) \-: -\/(a))}\label{arith_8h_ae2f08dc603ae93c402abd918ba4e23e1}


Definition at line 45 of file arith.\-h.



Referenced by bezier\-\_\-clip(), fill\-Line(), get\-\_\-angle(), make\-Dot\-Graph(), Operator\-\_\-diag\-\_\-precon\-\_\-new(), Operator\-\_\-uniform\-\_\-stress\-\_\-diag\-\_\-precon\-\_\-new(), Sparse\-Matrix\-\_\-crop(), Sparse\-Matrix\-\_\-is\-\_\-symmetric(), Sparse\-Matrix\-\_\-normalize\-\_\-by\-\_\-row(), Sparse\-Matrix\-\_\-page\-\_\-rank(), Sparse\-Matrix\-\_\-pseudo\-\_\-diameter\-\_\-weighted(), spline\-\_\-at\-\_\-y(), stress\-\_\-majorization\-\_\-k\-D\-\_\-mkernel(), uniform\-\_\-stress(), and Uniform\-Stress\-Smoother\-\_\-new().

\index{arith.\-h@{arith.\-h}!A\-V\-G@{A\-V\-G}}
\index{A\-V\-G@{A\-V\-G}!arith.h@{arith.\-h}}
\subsubsection[{A\-V\-G}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-V\-G(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~((a + b) / 2)}\label{arith_8h_a5d66ce7f9d1958415dc8a5f9556e73b2}


Definition at line 47 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!B\-E\-T\-W\-E\-E\-N@{B\-E\-T\-W\-E\-E\-N}}
\index{B\-E\-T\-W\-E\-E\-N@{B\-E\-T\-W\-E\-E\-N}!arith.h@{arith.\-h}}
\subsubsection[{B\-E\-T\-W\-E\-E\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define B\-E\-T\-W\-E\-E\-N(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b, }
\item[{}]{c}
\end{DoxyParamCaption}
)~(((a) $<$= (b)) \&\& ((b) $<$= (c)))}\label{arith_8h_a043815e8b2e49280dc4fcd060fc56a38}


Definition at line 74 of file arith.\-h.



Referenced by spline\-\_\-at\-\_\-y().

\index{arith.\-h@{arith.\-h}!C\-M\-P@{C\-M\-P}}
\index{C\-M\-P@{C\-M\-P}!arith.h@{arith.\-h}}
\subsubsection[{C\-M\-P}]{\setlength{\rightskip}{0pt plus 5cm}\#define C\-M\-P(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~(((a)$<$(b)) ? -\/1 \-: (((a)$>$(b)) ? 1 \-: 0))}\label{arith_8h_adf44891366ab95806ded6886a9f1c2ee}


Definition at line 49 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!D\-E\-G\-R\-E\-E\-S@{D\-E\-G\-R\-E\-E\-S}}
\index{D\-E\-G\-R\-E\-E\-S@{D\-E\-G\-R\-E\-E\-S}!arith.h@{arith.\-h}}
\subsubsection[{D\-E\-G\-R\-E\-E\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define D\-E\-G\-R\-E\-E\-S(
\begin{DoxyParamCaption}
\item[{}]{rad}
\end{DoxyParamCaption}
)~((rad)/{\bf M\-\_\-\-P\-I} $\ast$ 180.\-0)}\label{arith_8h_aaee81a47de7098b758f6aadc3e2d9007}


Definition at line 86 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!I\-N\-T\-\_\-\-M\-A\-X@{I\-N\-T\-\_\-\-M\-A\-X}}
\index{I\-N\-T\-\_\-\-M\-A\-X@{I\-N\-T\-\_\-\-M\-A\-X}!arith.h@{arith.\-h}}
\subsubsection[{I\-N\-T\-\_\-\-M\-A\-X}]{\setlength{\rightskip}{0pt plus 5cm}\#define I\-N\-T\-\_\-\-M\-A\-X~(({\bf int})($\sim$(unsigned)0 $>$$>$ 1))}\label{arith_8h_a9ec306f36d50c7375e74f0d1c55a3a67}


Definition at line 52 of file arith.\-h.



Referenced by bfs(), compute\-\_\-bb(), dijkstra(), rank1(), size\-Array(), and valid\-Q\-\_\-int\-\_\-string().

\index{arith.\-h@{arith.\-h}!I\-N\-T\-\_\-\-M\-I\-N@{I\-N\-T\-\_\-\-M\-I\-N}}
\index{I\-N\-T\-\_\-\-M\-I\-N@{I\-N\-T\-\_\-\-M\-I\-N}!arith.h@{arith.\-h}}
\subsubsection[{I\-N\-T\-\_\-\-M\-I\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define I\-N\-T\-\_\-\-M\-I\-N~(-\/{\bf I\-N\-T\-\_\-\-M\-A\-X} -\/ 1)}\label{arith_8h_a21658776274b3d146c674318b635a334}


Definition at line 56 of file arith.\-h.



Referenced by valid\-Q\-\_\-int\-\_\-string().

\index{arith.\-h@{arith.\-h}!M\-\_\-\-P\-I@{M\-\_\-\-P\-I}}
\index{M\-\_\-\-P\-I@{M\-\_\-\-P\-I}!arith.h@{arith.\-h}}
\subsubsection[{M\-\_\-\-P\-I}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-\_\-\-P\-I~3.\-14159265358979323846}\label{arith_8h_ae71449b1cc6e6250b91f539153a7a0d3}


Definition at line 77 of file arith.\-h.



Referenced by attach\-\_\-attrs\-\_\-and\-\_\-arrows(), endpath(), layout\-\_\-block(), make\-Obstacle(), and wedged\-Ellipse().

\index{arith.\-h@{arith.\-h}!M\-A\-X@{M\-A\-X}}
\index{M\-A\-X@{M\-A\-X}!arith.h@{arith.\-h}}
\subsubsection[{M\-A\-X}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-X(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~((a)$>$(b)?(a)\-:(b))}\label{arith_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}


Definition at line 40 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!M\-A\-X\-D\-O\-U\-B\-L\-E@{M\-A\-X\-D\-O\-U\-B\-L\-E}}
\index{M\-A\-X\-D\-O\-U\-B\-L\-E@{M\-A\-X\-D\-O\-U\-B\-L\-E}!arith.h@{arith.\-h}}
\subsubsection[{M\-A\-X\-D\-O\-U\-B\-L\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-X\-D\-O\-U\-B\-L\-E~1.\-7976931348623157e+308}\label{arith_8h_ace724a9256f4e65b352465e5feb24a21}


Definition at line 64 of file arith.\-h.



Referenced by choose\-\_\-node(), Plegal\-\_\-arrangement(), rank3(), stress\-\_\-majorization\-\_\-k\-D\-\_\-mkernel(), and xdot\-B\-B().

\index{arith.\-h@{arith.\-h}!M\-A\-X\-F\-L\-O\-A\-T@{M\-A\-X\-F\-L\-O\-A\-T}}
\index{M\-A\-X\-F\-L\-O\-A\-T@{M\-A\-X\-F\-L\-O\-A\-T}!arith.h@{arith.\-h}}
\subsubsection[{M\-A\-X\-F\-L\-O\-A\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-X\-F\-L\-O\-A\-T~((float)3.\-40282347e+38)}\label{arith_8h_a5e9e29217f6ec61105a4520ec5942225}


Definition at line 68 of file arith.\-h.



Referenced by dijkstra\-\_\-f(), and stress\-\_\-majorization\-\_\-k\-D\-\_\-mkernel().

\index{arith.\-h@{arith.\-h}!M\-A\-X\-S\-H\-O\-R\-T@{M\-A\-X\-S\-H\-O\-R\-T}}
\index{M\-A\-X\-S\-H\-O\-R\-T@{M\-A\-X\-S\-H\-O\-R\-T}!arith.h@{arith.\-h}}
\subsubsection[{M\-A\-X\-S\-H\-O\-R\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-A\-X\-S\-H\-O\-R\-T~(0x7fff)}\label{arith_8h_a1e5264eeb3e2ad97c6f33d88e80a49b4}


Definition at line 60 of file arith.\-h.



Referenced by dot\-\_\-scan\-\_\-ranks().

\index{arith.\-h@{arith.\-h}!M\-I\-N@{M\-I\-N}}
\index{M\-I\-N@{M\-I\-N}!arith.h@{arith.\-h}}
\subsubsection[{M\-I\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\-I\-N(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~((a)$<$(b)?(a)\-:(b))}\label{arith_8h_a3acffbd305ee72dcd4593c0d8af64a4f}


Definition at line 35 of file arith.\-h.



Referenced by add\-Edge\-Labels(), arrow\-\_\-bb(), beginpath(), colorxlate(), edgelist\-\_\-export(), embed\-\_\-graph(), endpath(), export\-\_\-embedding(), get\-\_\-gradient\-\_\-points(), Import\-\_\-coord\-\_\-clusters\-\_\-from\-\_\-dot(), make\-Dot\-Graph(), on\-\_\-drawingarea1\-\_\-configure\-\_\-event(), on\-\_\-drawingarea2\-\_\-expose\-\_\-event(), oned\-\_\-optimizer\-\_\-train(), Plegal\-\_\-arrangement(), poly\-B\-B(), Quad\-Tree\-\_\-new\-\_\-from\-\_\-point\-\_\-list(), round\-\_\-corners(), scale\-\_\-to\-\_\-box(), Sparse\-Matrix\-\_\-k\-\_\-centers(), Sparse\-Matrix\-\_\-k\-\_\-centers\-\_\-user(), Sparse\-Matrix\-\_\-pseudo\-\_\-diameter\-\_\-unweighted(), Sparse\-Matrix\-\_\-sum\-\_\-repeat\-\_\-entries(), and vector\-\_\-percentile().

\index{arith.\-h@{arith.\-h}!R\-A\-D\-I\-A\-N\-S@{R\-A\-D\-I\-A\-N\-S}}
\index{R\-A\-D\-I\-A\-N\-S@{R\-A\-D\-I\-A\-N\-S}!arith.h@{arith.\-h}}
\subsubsection[{R\-A\-D\-I\-A\-N\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-A\-D\-I\-A\-N\-S(
\begin{DoxyParamCaption}
\item[{}]{deg}
\end{DoxyParamCaption}
)~((deg)/180.\-0 $\ast$ {\bf M\-\_\-\-P\-I})}\label{arith_8h_a4af1b2e9b11a7583daf59f2cb45a22e5}


Definition at line 85 of file arith.\-h.



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

\index{arith.\-h@{arith.\-h}!R\-O\-U\-N\-D@{R\-O\-U\-N\-D}}
\index{R\-O\-U\-N\-D@{R\-O\-U\-N\-D}!arith.h@{arith.\-h}}
\subsubsection[{R\-O\-U\-N\-D}]{\setlength{\rightskip}{0pt plus 5cm}\#define R\-O\-U\-N\-D(
\begin{DoxyParamCaption}
\item[{}]{f}
\end{DoxyParamCaption}
)~((f$>$=0)?({\bf int})(f + .\-5)\-:({\bf int})(f -\/ .\-5))}\label{arith_8h_a91a8600e2a2859a47dbc2ba39960a352}


Definition at line 84 of file arith.\-h.



Referenced by box\-\_\-connection(), fill\-Line(), gv\-Layout(), make\-\_\-aux\-\_\-edge(), and tcldot\-\_\-layout().

\index{arith.\-h@{arith.\-h}!S\-G\-N@{S\-G\-N}}
\index{S\-G\-N@{S\-G\-N}!arith.h@{arith.\-h}}
\subsubsection[{S\-G\-N}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-G\-N(
\begin{DoxyParamCaption}
\item[{}]{a}
\end{DoxyParamCaption}
)~(((a)$<$0)? -\/1 \-: 1)}\label{arith_8h_a0501e9b03fb5d244efedcc437ef66f68}


Definition at line 48 of file arith.\-h.



Referenced by fill\-Line().

\index{arith.\-h@{arith.\-h}!sincos@{sincos}}
\index{sincos@{sincos}!arith.h@{arith.\-h}}
\subsubsection[{sincos}]{\setlength{\rightskip}{0pt plus 5cm}\#define sincos(
\begin{DoxyParamCaption}
\item[{}]{x, }
\item[{}]{{\bf s}, }
\item[{}]{c}
\end{DoxyParamCaption}
)~$\ast${\bf s} = sin(x); $\ast$c = cos(x)}\label{arith_8h_acc80bfed9382d1c32be56f4114e1fbeb}


Definition at line 93 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!S\-Q\-R@{S\-Q\-R}}
\index{S\-Q\-R@{S\-Q\-R}!arith.h@{arith.\-h}}
\subsubsection[{S\-Q\-R}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-Q\-R(
\begin{DoxyParamCaption}
\item[{}]{a}
\end{DoxyParamCaption}
)~((a) $\ast$ (a))}\label{arith_8h_ad41630f833e920c1ffa34722f45a8e77}


Definition at line 88 of file arith.\-h.

\index{arith.\-h@{arith.\-h}!S\-Q\-R\-T2@{S\-Q\-R\-T2}}
\index{S\-Q\-R\-T2@{S\-Q\-R\-T2}!arith.h@{arith.\-h}}
\subsubsection[{S\-Q\-R\-T2}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-Q\-R\-T2~1.\-41421356237309504880}\label{arith_8h_a514396dd60fa0621c83072091fb2a0cd}


Definition at line 81 of file arith.\-h.

