\section{dd\-Vertex  Class Template Reference}
\label{class_ddVertex}\index{ddVertex@{dd\-Vertex}}
{\tt \#include $<$ddvertex.h$>$}

\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef set$<${\bf dd\-Edge}$<$WT$>$ $>$ {\bf Edge\-Set}
\end{CompactItemize}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf dd\-Vertex} (int id)
\item 
{\bf dd\-Vertex} ()
\item 
{\bf $\sim$dd\-Vertex} ()
\item 
int {\bf Have\-Self\-Loop} () const
\item 
int {\bf Out\-Degree} () const
\item 
int {\bf In\-Degree} () const
\item 
int {\bf Degree} () const
\item 
const double\& {\bf Get\-Weight\-To} (dd\-Vertex$<$ WT $>$ $\ast$v) const
\item 
const double\& {\bf Get\-Weight\-From} (dd\-Vertex$<$ WT $>$ $\ast$v) const
\item 
void {\bf Set\-Weight\-To} (dd\-Vertex$<$ WT $>$ $\ast$v, const WT \&weight)
\item 
void {\bf Set\-Weight\-From} (dd\-Vertex$<$ WT $>$ $\ast$v, const WT \&weight)
\item 
void {\bf Change\-Weight\-To} (dd\-Vertex$<$ WT $>$ $\ast$v, const WT \&delta)
\item 
void {\bf Change\-Weight\-From} (dd\-Vertex$<$ WT $>$ $\ast$v, const WT \&delta)
\item 
int {\bf Rem\-Out\-Edges} ()
\item 
int {\bf Rem\-In\-Edges} ()
\item 
int {\bf Rem\-Edges} ()
\item 
void {\bf Print\-Out\-Edges} (ostream \&os) const
\item 
void {\bf Print\-In\-Edges} (ostream \&os) const
\item 
void {\bf Print\-Edges} (ostream \&os) const
\item 
int {\bf Compare} (const dd\-Vertex$<$ WT $>$ \&v) const
\item 
{\bf MAKECOMPARISONS\_\-WITH\_\-COMPARE} (dd\-Vertex$<$ WT $>$)
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
int {\bf ID}
\item 
{\bf Edge\-Set} {\bf Out\-E}
\item 
{\bf Edge\-Set} {\bf In\-E}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
ostream\& {\bf operator} (ostream \&os, const dd\-Vertex$<$ WT $>$ \&vert)
\end{CompactItemize}
\subsubsection*{template$<$class WT = double$>$  class dd\-Vertex}



\subsection{Member Typedef Documentation}
\index{ddVertex@{dd\-Vertex}!EdgeSet@{EdgeSet}}
\index{EdgeSet@{EdgeSet}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ typedef set$<$ {\bf dd\-Edge}$<$ WT $>$ $>$ dd\-Vertex$<$WT$>$::Edge\-Set}\label{class_ddVertex_s0}




Definition at line 68 of file ddvertex.h.

\subsection{Constructor \& Destructor Documentation}
\index{ddVertex@{dd\-Vertex}!ddVertex@{ddVertex}}
\index{ddVertex@{ddVertex}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ dd\-Vertex$<$ WT $>$::dd\-Vertex$<$WT$>$ (int {\em id})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a0}




Definition at line 12 of file ddvertex.inc.\footnotesize\begin{verbatim}00013   {
00014     ID = id>=0 ? id : -1;
00015 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!ddVertex@{ddVertex}}
\index{ddVertex@{ddVertex}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ dd\-Vertex$<$ WT $>$::dd\-Vertex$<$WT$>$ ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a1}




Definition at line 18 of file ddvertex.inc.\footnotesize\begin{verbatim}00019   {
00020     ID = -1;
00021 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!~ddVertex@{$\sim$ddVertex}}
\index{~ddVertex@{$\sim$ddVertex}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ dd\-Vertex$<$ WT $>$::$\sim$dd\-Vertex$<$WT$>$ ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a2}




Definition at line 177 of file ddvertex.inc.\footnotesize\begin{verbatim}00178   {
00179     RemEdges();
00180 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{ddVertex@{dd\-Vertex}!ChangeWeightFrom@{ChangeWeightFrom}}
\index{ChangeWeightFrom@{ChangeWeightFrom}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Change\-Weight\-From (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}, const WT \& {\em delta})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a12}




Definition at line 85 of file ddvertex.inc.

Referenced by dd\-Graph::Change\-Weight().\footnotesize\begin{verbatim}00086   {
00087     ddEdge<WT> e; e.V = v; 
00088     if(!v || InE.count(e)<1) raise(SIGQUIT);
00089     ((ddEdge<WT>&)(*(InE.find(e)))).W += delta;
00090 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!ChangeWeightTo@{ChangeWeightTo}}
\index{ChangeWeightTo@{ChangeWeightTo}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Change\-Weight\-To (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}, const WT \& {\em delta})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a11}




Definition at line 77 of file ddvertex.inc.

Referenced by dd\-Graph::Change\-Weight().\footnotesize\begin{verbatim}00078   {
00079     ddEdge<WT> e; e.V = v; 
00080     if(!v || OutE.count(e)<1) raise(SIGQUIT);
00081     ((ddEdge<WT>&)(*(OutE.find(e)))).W += delta;
00082 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!Compare@{Compare}}
\index{Compare@{Compare}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ int dd\-Vertex$<$WT$>$::Compare (const dd\-Vertex$<$ WT $>$ \& {\em v}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a19}




Definition at line 100 of file ddvertex.h.\footnotesize\begin{verbatim}00101                   { return (ID - v.ID); }
00102 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!Degree@{Degree}}
\index{Degree@{Degree}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Degree () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a6}




Definition at line 41 of file ddvertex.inc.

Referenced by dd\-Graph::Rem\-Vertex().\footnotesize\begin{verbatim}00042   { return OutDegree() + InDegree() - HaveSelfLoop(); }
00043 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!GetWeightFrom@{GetWeightFrom}}
\index{GetWeightFrom@{GetWeightFrom}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ const double \& dd\-Vertex$<$ WT $>$::Get\-Weight\-From (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a8}




Definition at line 53 of file ddvertex.inc.\footnotesize\begin{verbatim}00054   {
00055     ddEdge<WT> e; e.V = v; 
00056     if(!v || InE.count(e)<1) raise(SIGQUIT);
00057     return (*(InE.find(e))).W;
00058 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!GetWeightTo@{GetWeightTo}}
\index{GetWeightTo@{GetWeightTo}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ const double \& dd\-Vertex$<$ WT $>$::Get\-Weight\-To (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a7}




Definition at line 45 of file ddvertex.inc.\footnotesize\begin{verbatim}00046   {
00047     ddEdge<WT> e; e.V = v; 
00048     if(!v || OutE.count(e)<1) raise(SIGQUIT);
00049     return (*(OutE.find(e))).W;
00050 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!HaveSelfLoop@{HaveSelfLoop}}
\index{HaveSelfLoop@{HaveSelfLoop}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Have\-Self\-Loop () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a3}




Definition at line 24 of file ddvertex.inc.

Referenced by Degree().\footnotesize\begin{verbatim}00025   {
00026     if(OutE.size()==0) return 0;
00027     for(EdgeSet::const_iterator it = OutE.begin(); it!=OutE.end(); ++it)
00028         if(($\ast$it).V == this) return 1;
00029     return 0;
00030 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!InDegree@{InDegree}}
\index{InDegree@{InDegree}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::In\-Degree () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a5}




Definition at line 37 of file ddvertex.inc.

Referenced by sd\-Graph::Copy(), Degree(), dd\-Graph::Degree(), and dd\-Graph::In\-Degree().\footnotesize\begin{verbatim}00038   { return InE.size(); }
00039 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!MAKECOMPARISONS_WITH_COMPARE@{MAKECOMPARISONS\_\-WITH\_\-COMPARE}}
\index{MAKECOMPARISONS_WITH_COMPARE@{MAKECOMPARISONS\_\-WITH\_\-COMPARE}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ dd\-Vertex$<$WT$>$::MAKECOMPARISONS\_\-WITH\_\-COMPARE (dd\-Vertex$<$ WT $>$)}\label{class_ddVertex_a20}


\index{ddVertex@{dd\-Vertex}!OutDegree@{OutDegree}}
\index{OutDegree@{OutDegree}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Out\-Degree () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a4}




Definition at line 33 of file ddvertex.inc.

Referenced by sd\-Graph::Copy(), Degree(), dd\-Graph::Degree(), and dd\-Graph::Out\-Degree().\footnotesize\begin{verbatim}00034   { return OutE.size(); }
00035 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!PrintEdges@{PrintEdges}}
\index{PrintEdges@{PrintEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Print\-Edges (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a18}




Definition at line 117 of file ddvertex.inc.\footnotesize\begin{verbatim}00118   { PrintOutEdges(os); PrintInEdges(os); }
00119 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!PrintInEdges@{PrintInEdges}}
\index{PrintInEdges@{PrintInEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Print\-In\-Edges (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a17}




Definition at line 105 of file ddvertex.inc.

Referenced by Print\-Edges().\footnotesize\begin{verbatim}00106   {
00107     EdgeSet::const_iterator it;
00108     ddEdge<WT> edge;
00109     for(it = InE.begin(); it!=InE.end(); ++it)
00110       {
00111         edge = *it;
00112         os << '\t' << edge.V->ID << '\t' << ID << '\t' << edge.W << '\n';
00113       }
00114 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!PrintOutEdges@{PrintOutEdges}}
\index{PrintOutEdges@{PrintOutEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Print\-Out\-Edges (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a16}




Definition at line 93 of file ddvertex.inc.

Referenced by Print\-Edges().\footnotesize\begin{verbatim}00094   {
00095     EdgeSet::const_iterator it;
00096     ddEdge<WT> edge;
00097     for(it = OutE.begin(); it!=OutE.end(); ++it)
00098       {
00099         edge = *it;
00100         os << '\t' << ID << '\t' << edge.V->ID << '\t' << edge.W << '\n';
00101       }
00102 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!RemEdges@{RemEdges}}
\index{RemEdges@{RemEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Rem\-Edges ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a15}




Definition at line 173 of file ddvertex.inc.

Referenced by dd\-Graph::Rem\-Edges(), and $\sim$dd\-Vertex().\footnotesize\begin{verbatim}00174   { return RemOutEdges() + RemInEdges(); }
00175 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!RemInEdges@{RemInEdges}}
\index{RemInEdges@{RemInEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Rem\-In\-Edges ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a14}




Definition at line 155 of file ddvertex.inc.

Referenced by Rem\-Edges(), and dd\-Graph::Rem\-In\-Edges().\footnotesize\begin{verbatim}00156   {
00157     ddEdge<WT> t;
00158     int n = InE.size();
00159     t.V = this;
00160     // Remove all our neighbors' outgoing edges to us.
00161     //
00162     for(EdgeSet::iterator it = InE.begin(); it!=InE.end(); ++it)
00163         if(($\ast$it).V) 
00164             ($\ast$it).V->OutE.erase(t);
00165 
00166     // Remove all our incoming edges.
00167     //
00168     InE.clear();
00169     return n;
00170 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!RemOutEdges@{RemOutEdges}}
\index{RemOutEdges@{RemOutEdges}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ int dd\-Vertex$<$ WT $>$::Rem\-Out\-Edges ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a13}




Definition at line 132 of file ddvertex.inc.

Referenced by Rem\-Edges(), and dd\-Graph::Rem\-Out\-Edges().\footnotesize\begin{verbatim}00133   {
00134     //
00135     // This is a one sided removal!  Otherwise it may cause the IterateOver()
00136     // function to break: we can't remove the edges from the array we've
00137     // been called from, just those from the vertices we point to.
00138     //
00139     ddEdge<WT> f;
00140     int n = OutE.size();
00141     f.V = this;
00142     // Remove all our neighbors' incoming edges from us.
00143     //
00144     for(EdgeSet::iterator it = OutE.begin(); it!=OutE.end(); ++it)
00145         if(($\ast$it).V) 
00146             ($\ast$it).V->InE.erase(f);
00147 
00148     // Remove all our edges.
00149     //
00150     OutE.clear();
00151     return n;
00152 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!SetWeightFrom@{SetWeightFrom}}
\index{SetWeightFrom@{SetWeightFrom}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Set\-Weight\-From (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}, const WT \& {\em weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a10}




Definition at line 69 of file ddvertex.inc.

Referenced by dd\-Graph::Set\-Weight().\footnotesize\begin{verbatim}00070   {
00071     ddEdge<WT> e; e.V = v; 
00072     if(!v || InE.count(e)<1) raise(SIGQUIT);
00073     ((ddEdge<WT>&)(*(InE.find(e)))).W = weight;
00074 \end{verbatim}\normalsize 
\index{ddVertex@{dd\-Vertex}!SetWeightTo@{SetWeightTo}}
\index{SetWeightTo@{SetWeightTo}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT$>$ void dd\-Vertex$<$ WT $>$::Set\-Weight\-To (dd\-Vertex$<$ WT $>$ $\ast$ {\em v}, const WT \& {\em weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddVertex_a9}




Definition at line 61 of file ddvertex.inc.

Referenced by dd\-Graph::Set\-Weight().\footnotesize\begin{verbatim}00062   {
00063     ddEdge<WT> e; e.V = v; 
00064     if(!v || OutE.count(e)<1) raise(SIGQUIT);
00065     ((ddEdge<WT>&)(*(OutE.find(e)))).W = weight;
00066 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{ddVertex@{dd\-Vertex}!operator@{operator}}
\index{operator@{operator}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ ostream\& operator (ostream \& {\em os}, const dd\-Vertex$<$ WT $>$ \& {\em vert})\hspace{0.3cm}{\tt  [friend]}}\label{class_ddVertex_l0}




\subsection{Member Data Documentation}
\index{ddVertex@{dd\-Vertex}!ID@{ID}}
\index{ID@{ID}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ int dd\-Vertex$<$WT$>$::ID}\label{class_ddVertex_m0}




Definition at line 65 of file ddvertex.h.\index{ddVertex@{dd\-Vertex}!InE@{InE}}
\index{InE@{InE}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ {\bf Edge\-Set} dd\-Vertex$<$WT$>$::In\-E}\label{class_ddVertex_m2}




Definition at line 70 of file ddvertex.h.\index{ddVertex@{dd\-Vertex}!OutE@{OutE}}
\index{OutE@{OutE}!ddVertex@{dd\-Vertex}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class WT = double$>$ {\bf Edge\-Set} dd\-Vertex$<$WT$>$::Out\-E}\label{class_ddVertex_m1}




Definition at line 69 of file ddvertex.h.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf ddvertex.h}\item 
{\bf ddvertex.inc}\end{CompactItemize}
