\section{dd\-Graph  Class Template Reference}
\label{class_ddGraph}\index{ddGraph@{dd\-Graph}}
{\tt \#include $<$ddgraph.h$>$}

Collaboration diagram for dd\-Graph:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=106pt]{class_ddGraph_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef dd\-Graph$<$DT,WT$>$ {\bf DDG}
\end{CompactItemize}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf dd\-Graph} ()
\item 
{\bf dd\-Graph} (const dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
{\bf dd\-Graph} (const {\bf sd\-Graph}$<$ DT, WT $>$ \&sdg)
\item 
{\bf $\sim$dd\-Graph} ()
\item 
void {\bf Clear} ()
\item 
void {\bf Copy} (const dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
void {\bf Copy} (const {\bf sd\-Graph}$<$ DT, WT $>$ \&ddg)
\item 
int {\bf Num\-Vertices} () const
\item 
int {\bf Num\-Edges} () const
\item 
int {\bf Has\-Vertex} (const DT \&x) const
\item 
int {\bf Has\-Vertex} (int n) const
\item 
int {\bf Has\-Edge} (const DT \&from, const DT \&to) const
\item 
int {\bf Out\-Degree} (const DT \&x) const
\item 
int {\bf In\-Degree} (const DT \&x) const
\item 
int {\bf Degree} (const DT \&x) const
\item 
int {\bf Next\-Free\-Id} () const
\item 
int {\bf Add\-Vertex} (const DT \&x)
\item 
{\bf dd\-Vertex}$<$WT$>$$\ast$ {\bf Get\-Vertex} (const DT \&x)
\item 
int {\bf Get\-Vertex\-Id} (const DT \&x) const
\item 
DT\& {\bf Get\-Data} (int vid)
\item 
const DT\& {\bf Get\-Data} (int vid) const
\item 
DT\& {\bf Get\-Data} (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$v)
\item 
const DT\& {\bf Get\-Data} (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$v) const
\item 
int {\bf Add\-Edge} (const DT \&from, const DT \&to, const WT \&fwd\_\-weight, const WT \&bwd\_\-weight)
\item 
int {\bf Add\-Edge} (const DT \&from, const DT \&to, const WT \&weight)
\item 
int {\bf Add\-Edge} (const DT \&from, const DT \&to)
\item 
const WT\& {\bf Get\-Weight} (const DT \&from, const DT \&to, int fwd=1) const
\item 
const WT\& {\bf operator()} (const DT \&from, const DT \&to) const
\item 
void {\bf Set\-Weight} (const DT \&from, const DT \&to, const WT \&fwd\_\-weight, const WT \&bwd\_\-weight)
\item 
void {\bf Set\-Weight} (const DT \&from, const DT \&to, const WT \&weight)
\item 
void {\bf Change\-Weight} (const DT \&from, const DT \&to, const WT \&fwd\_\-del, const WT \&bwd\_\-del)
\item 
void {\bf Change\-Weight} (const DT \&from, const DT \&to, const WT \&del)
\item 
void {\bf Rem\-Out\-Edges} (const DT \&x)
\item 
void {\bf Rem\-In\-Edges} (const DT \&x)
\item 
void {\bf Rem\-Edges} (const DT \&x)
\item 
int {\bf Rem\-Vertex} (const DT \&x)
\item 
int {\bf Rem\-Edge} (const DT \&from, const DT \&to)
\item 
const dd\-Graph$<$DT,WT$>$\& {\bf operator=} (const dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
const dd\-Graph$<$DT,WT$>$\& {\bf operator=} (const {\bf sd\-Graph}$<$ DT, WT $>$ \&sdg)
\item 
void {\bf Output\-Simple} (ostream \&os)
\item 
int {\bf Output} (ostream \&os) const
\item 
int {\bf Input} (istream \&is)
\item 
{\bf MAKE\_\-IO\_\-STREAM\_\-OPERATORS} ({\bf DDG})
\end{CompactItemize}
\subsection*{Private Types}
\begin{CompactItemize}
\item 
typedef {\bf dd\-Edge}$<$WT$>$ {\bf Edge}
\item 
typedef {\bf dd\-Vertex}$<$WT$>$ {\bf Vertex}
\item 
typedef map$<$DT, {\bf Vertex}$\ast$$>$ {\bf Vertex\-Array}
\item 
typedef map$<$ int, DT $>$ {\bf Data\-Array}
\end{CompactItemize}
\subsection*{Private Methods}
\begin{CompactItemize}
\item 
int {\bf Out\-Degree} (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
int {\bf In\-Degree} (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
int {\bf Degree} (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
int {\bf Add\-Edge} ({\bf dd\-Vertex}$<$ WT $>$ $\ast$from, {\bf dd\-Vertex}$<$ WT $>$ $\ast$to, const WT \&fwd\_\-weight, const WT \&bwd\_\-weight)
\item 
int {\bf Rem\-Edge} ({\bf dd\-Vertex}$<$ WT $>$ $\ast$from, {\bf dd\-Vertex}$<$ WT $>$ $\ast$to)
\item 
void {\bf Set\-Weight} ({\bf dd\-Vertex}$<$ WT $>$ $\ast$from, {\bf dd\-Vertex}$<$ WT $>$ $\ast$to, const WT \&fwd\_\-weight, const WT \&bwd\_\-weight)
\item 
void {\bf Change\-Weight} ({\bf dd\-Vertex}$<$ WT $>$ $\ast$from, {\bf dd\-Vertex}$<$ WT $>$ $\ast$to, const WT \&fwd\_\-del, const WT \&bwd\_\-del)
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
{\bf Id\-Gen} {\bf IDG}
\item 
int {\bf Num\-V}
\item 
int {\bf Num\-E}
\item 
{\bf Vertex\-Array} {\bf VA}
\item 
{\bf Data\-Array} {\bf Data}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf sd\-Graph$<$ DT, WT $>$}
\item 
istream\& {\bf Input\-Binary} (istream \&is, dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
istream\& {\bf operator$>$=} (istream \&is, dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
ostream\& {\bf Output\-Binary} (ostream \&os, const dd\-Graph$<$ DT, WT $>$ \&ddg)
\item 
ostream\& {\bf operator} (ostream \&os, const dd\-Graph$<$ DT, WT $>$ \&ddg)
\end{CompactItemize}
\subsubsection*{template$<$class DT, class WT = double$>$  class dd\-Graph}



\subsection{Member Typedef Documentation}
\index{ddGraph@{dd\-Graph}!DDG@{DDG}}
\index{DDG@{DDG}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ typedef dd\-Graph$<$ DT, WT $>$ dd\-Graph$<$DT, WT$>$::DDG}\label{class_ddGraph_s0}




Definition at line 167 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!DataArray@{DataArray}}
\index{DataArray@{DataArray}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ typedef map$<$ int, DT $>$ dd\-Graph$<$DT, WT$>$::Data\-Array\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_u3}




Definition at line 191 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!Edge@{Edge}}
\index{Edge@{Edge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ typedef {\bf dd\-Edge}$<$ WT $>$ dd\-Graph$<$DT, WT$>$::Edge\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_u0}




Definition at line 184 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!Vertex@{Vertex}}
\index{Vertex@{Vertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ typedef {\bf dd\-Vertex}$<$ WT $>$ dd\-Graph$<$DT, WT$>$::Vertex\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_u1}




Definition at line 185 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!VertexArray@{VertexArray}}
\index{VertexArray@{VertexArray}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ typedef map$<$ DT, {\bf Vertex} $\ast$$>$ dd\-Graph$<$DT, WT$>$::Vertex\-Array\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_u2}




Definition at line 186 of file ddgraph.h.

\subsection{Constructor \& Destructor Documentation}
\index{ddGraph@{dd\-Graph}!ddGraph@{ddGraph}}
\index{ddGraph@{ddGraph}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ dd\-Graph$<$ DT, WT $>$::dd\-Graph$<$DT, WT$>$ ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a0}




Definition at line 132 of file ddgraph.inc.\footnotesize\begin{verbatim}00133   {
00134     NumV = 0;
00135     NumE = 0;
00136 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!ddGraph@{ddGraph}}
\index{ddGraph@{ddGraph}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ dd\-Graph$<$ DT, WT $>$::dd\-Graph$<$DT, WT$>$ (const dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a1}




Definition at line 139 of file ddgraph.inc.\footnotesize\begin{verbatim}00140   {
00141     NumV = 0;
00142     NumE = 0;
00143     Copy(ddg);
00144 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!ddGraph@{ddGraph}}
\index{ddGraph@{ddGraph}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ dd\-Graph$<$ DT, WT $>$::dd\-Graph$<$DT, WT$>$ (const {\bf sd\-Graph}$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a2}




Definition at line 147 of file ddgraph.inc.\footnotesize\begin{verbatim}00148   {
00149     NumV = 0;
00150     NumE = 0;
00151     Copy(sdg);
00152 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!~ddGraph@{$\sim$ddGraph}}
\index{~ddGraph@{$\sim$ddGraph}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ dd\-Graph$<$ DT, WT $>$::$\sim$dd\-Graph$<$DT, WT$>$ ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a3}




Definition at line 155 of file ddgraph.inc.\footnotesize\begin{verbatim}00156   { Clear(); }
00157 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{ddGraph@{dd\-Graph}!AddEdge@{AddEdge}}
\index{AddEdge@{AddEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Add\-Edge ({\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em from}, {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em to}, const WT \& {\em fwd\_\-weight}, const WT \& {\em bwd\_\-weight})\hspace{0.3cm}{\tt  [inline, private]}}\label{class_ddGraph_c3}




Definition at line 275 of file ddgraph.inc.\footnotesize\begin{verbatim}00277   {
00278     if(!from && !to)
00279         return VertexBad;
00280 
00281     Edge eF, eT;
00282     eT.V = to;   eT.W = fwd_weight;
00283     eF.V = from; eF.W = bwd_weight;
00284 
00285     // Check if the edge already exists
00286     if(from->OutE.count(eT)>0)
00287         return EdgeInG;
00288 
00289     from->OutE.insert(eT);
00290     to->InE.insert(eF);
00291     return ++NumE;
00292 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!AddEdge@{AddEdge}}
\index{AddEdge@{AddEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Add\-Edge (const DT \& {\em from}, const DT \& {\em to})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a25}




Definition at line 317 of file ddgraph.inc.\footnotesize\begin{verbatim}00318   { WT weight; return AddEdge(from,to,weight,weight); }
00319 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!AddEdge@{AddEdge}}
\index{AddEdge@{AddEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Add\-Edge (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a24}




Definition at line 313 of file ddgraph.inc.\footnotesize\begin{verbatim}00314   { return AddEdge(from,to,weight,weight); }
00315 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!AddEdge@{AddEdge}}
\index{AddEdge@{AddEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Add\-Edge (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em fwd\_\-weight}, const WT \& {\em bwd\_\-weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a23}




Definition at line 295 of file ddgraph.inc.

Referenced by Add\-Edge(), Copy(), Input(), and Constraint\-Manager::add().\footnotesize\begin{verbatim}00297   {
00298     ddVertex<WT> * FromV, * ToV;
00299 
00300     // If we dont have the vertices, just add them!
00301     //
00302     if((!HasVertex(from) && (AddVertex(from)<0)) ||
00303        (!HasVertex(to) && (AddVertex(to)<0)))
00304             return VertexAddFailure;
00305 
00306     FromV = VA[from];
00307     ToV   = VA[to];
00308 
00309     return AddEdge(FromV,ToV,fwd_weight,bwd_weight);
00310 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!AddVertex@{AddVertex}}
\index{AddVertex@{AddVertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Add\-Vertex (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a16}




Definition at line 217 of file ddgraph.inc.

Referenced by Add\-Edge(), Copy(), and Constraint\-Manager::add().\footnotesize\begin{verbatim}00218   {
00219     if(HasVertex(x)) return VA[x]->ID;
00220     int id = IDG.Get();
00221     Data[id] = x;
00222     ddVertex<WT> * vert = new ddVertex<WT>(id);
00223     VA[x] = vert;
00224     ++NumV;
00225     return id;
00226 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!ChangeWeight@{ChangeWeight}}
\index{ChangeWeight@{ChangeWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Change\-Weight ({\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em from}, {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em to}, const WT \& {\em fwd\_\-del}, const WT \& {\em bwd\_\-del})\hspace{0.3cm}{\tt  [inline, private]}}\label{class_ddGraph_c6}




Definition at line 367 of file ddgraph.inc.\footnotesize\begin{verbatim}00369   {
00370     if(!from || !to) 
00371       { cerr << "ddGraph::ChangeWeight\n"; raise(SIGQUIT); }
00372 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!ChangeWeight@{ChangeWeight}}
\index{ChangeWeight@{ChangeWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Change\-Weight (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em delta})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a31}




Definition at line 386 of file ddgraph.inc.\footnotesize\begin{verbatim}00388   { ChangeWeight(from,to,delta,delta); }
00389 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!ChangeWeight@{ChangeWeight}}
\index{ChangeWeight@{ChangeWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Change\-Weight (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em fwd\_\-del}, const WT \& {\em bwd\_\-del})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a30}




Definition at line 377 of file ddgraph.inc.

Referenced by Change\-Weight().\footnotesize\begin{verbatim}00379   {
00380     if(!HasEdge(from,to))
00381       { cerr << "ddGraph::ChangeWeight\n"; raise(SIGQUIT); }
00382 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Clear@{Clear}}
\index{Clear@{Clear}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Clear ()\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a4}




Definition at line 55 of file ddgraph.inc.

Referenced by Copy(), Input(), and $\sim$dd\-Graph().\footnotesize\begin{verbatim}00056   {
00057     for(VertexArray::iterator it = VA.begin(); it!=VA.end(); ++it)
00058         delete ($\ast$it).second;
00059     VA.clear();
00060     Data.clear();
00061     IDG.Reset();
00062     NumV = 0;
00063     NumE = 0;
00064 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Copy@{Copy}}
\index{Copy@{Copy}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Copy (const {\bf sd\-Graph}$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a6}




Definition at line 94 of file ddgraph.inc.\footnotesize\begin{verbatim}00095   {
00096     Clear();
00097 
00098     // Add all the edges to the graph:
00099     //
00100     int k;
00101     sdEdge<WT> edge;
00102     edge.V = new sdVertex<WT>;
00103     for(int i=0; i<sdg.NumV; ++i)
00104       {
00105         if(AddVertex(sdg.Data[i])<0)
00106             { cerr << "ddGraph::Copy(sdGraph)#1\n"; raise(SIGQUIT); }
00107         edge.V->ID = i;
00108         for(int j=0; j<sdg.VA[i]->NumO; ++j)
00109           {
00110             k = BinSearch(sdg.VA[i]->OutE[j].V->InE, 
00111                           sdg.VA[i]->OutE[j].V->NumI,
00112                           edge);
00113             if(k<0 || k>=sdg.VA[i]->OutE[j].V->NumI)
00114               { cerr << "ddGraph::Copy(sdGraph)#2\n"; raise(SIGQUIT); }
00115 
00116             AddEdge(sdg.Data[i], 
00117                     sdg.Data[(sdg.VA[i]->OutE[j].V->ID)],
00118                     sdg.VA[i]->OutE[j].W,
00119                     sdg.VA[i]->OutE[j].V->InE[k].W);
00120           }
00121       }
00122 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Copy@{Copy}}
\index{Copy@{Copy}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Copy (const dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a5}




Definition at line 67 of file ddgraph.inc.

Referenced by dd\-Graph(), and operator=().\footnotesize\begin{verbatim}00068   {
00069     if(this == &ddg) return;
00070     Clear();
00071     if(ddg.NumV<=0) return;
00072 
00073     // Add all the edges to the graph (this automatically takes care
00074     // of adding vertices btw.
00075     //
00076     set<Edge>::const_iterator eit;
00077     Edge edge;
00078     edge.V = new ddVertex<WT>;
00079     VertexArray::const_iterator vit;
00080     for(vit = ddg.VA.begin(); vit!=ddg.VA.end(); ++vit)
00081       {
00082         if((edge.V->ID = AddVertex((*vit).first))<0)
00083             { cerr << "ddGraph::Copy(ddGraph)\n"; raise(SIGQUIT); }
00084         for(eit = (($\ast$vit).second)->OutE.begin();
00085             eit!=(($\ast$vit).second)->OutE.end(); ++eit)
00086             AddEdge((*vit).first, 
00087                     ddg.Data[($\ast$eit).V->ID], 
00088                     eit->W, ((($\ast$eit).V)->InE).find(edge)->W);
00089       }
00090 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Degree@{Degree}}
\index{Degree@{Degree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int dd\-Graph$<$DT, WT$>$::Degree (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_c2}


\index{ddGraph@{dd\-Graph}!Degree@{Degree}}
\index{Degree@{Degree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Degree (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a14}




Definition at line 205 of file ddgraph.inc.\footnotesize\begin{verbatim}00206   { 
00207     if(!HasVertex(x)) return VertexNotInG;
00208     ddVertex<WT>* vert = VA[x];
00209     return (vert->OutDegree() + vert->InDegree());
00210 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const DT \& dd\-Graph$<$ DT, WT $>$::Get\-Data (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em v}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a22}




Definition at line 267 of file ddgraph.inc.\footnotesize\begin{verbatim}00268   { 
00269     if(!v)
00270       { cerr << "ddGraph::GetData(ddVertex<WT>*)\n"; raise(SIGQUIT); }
00271 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ DT \& dd\-Graph$<$ DT, WT $>$::Get\-Data (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em v})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a21}




Definition at line 259 of file ddgraph.inc.\footnotesize\begin{verbatim}00260   { 
00261     if(!v)
00262       { cerr << "ddGraph::GetData(ddVertex<WT>*)\n"; raise(SIGQUIT); }
00263 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ const DT\& dd\-Graph$<$DT, WT$>$::Get\-Data (int {\em vid}) const}\label{class_ddGraph_a20}


\index{ddGraph@{dd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ DT \& dd\-Graph$<$ DT, WT $>$::Get\-Data (int {\em vid})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a19}




Definition at line 243 of file ddgraph.inc.

Referenced by sd\-Graph::Copy(), Get\-Data(), Constraint\-Manager::add(), Constraint\-Manager::clear\-All\-Constraints(), Constraint\-Manager::clear\-Constraints(), Constraint\-Manager::get\-Constraint(), and Constraint\-Manager::set\-Molecule().\footnotesize\begin{verbatim}00244   { 
00245     if(Data.count(vid)<1) 
00246       { cerr << "ddGraph::GetData("<<vid<<")\n"; raise(SIGQUIT); }
00247 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetVertex@{GetVertex}}
\index{GetVertex@{GetVertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf dd\-Vertex}$<$ WT $>$ $\ast$ dd\-Graph$<$ DT, WT $>$::Get\-Vertex (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a17}




Definition at line 229 of file ddgraph.inc.

Referenced by sd\-Graph::Copy().\footnotesize\begin{verbatim}00230   { 
00231     if(!HasVertex(x)) { cerr << "ddGraph::GetVertex\n"; raise(SIGQUIT); }
00232 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetVertexId@{GetVertexId}}
\index{GetVertexId@{GetVertexId}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Get\-Vertex\-Id (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a18}




Definition at line 236 of file ddgraph.inc.\footnotesize\begin{verbatim}00237   { 
00238     if(!HasVertex(x)) { cerr << "ddGraph::GetVertexId\n"; raise(SIGQUIT); }
00239 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!GetWeight@{GetWeight}}
\index{GetWeight@{GetWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const WT \& dd\-Graph$<$ DT, WT $>$::Get\-Weight (const DT \& {\em from}, const DT \& {\em to}, int {\em fwd} = 1) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a26}




Definition at line 321 of file ddgraph.inc.

Referenced by operator()().\footnotesize\begin{verbatim}00323   {
00324     Edge edge;
00325 
00326     ddVertex<WT> * FromV, * ToV;
00327     if(!HasVertex(from) || !HasVertex(to))
00328       { cerr << "ddGraph::GetWeight\n"; raise(SIGQUIT); }
00329 
00330     FromV = VA[from];
00331     ToV   = VA[to];
00332 
00333     if(fwd)
00334       {
00335         edge.V = ToV;
00336         return FromV->OutE.Find(edge).W;
00337       }
00338 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!HasEdge@{HasEdge}}
\index{HasEdge@{HasEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Has\-Edge (const DT \& {\em from}, const DT \& {\em to}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a11}




Definition at line 175 of file ddgraph.inc.

Referenced by Change\-Weight(), and Set\-Weight().\footnotesize\begin{verbatim}00176   {
00177     //
00178     // If either of the vertices is not in the graph then the edge must not be.
00179     //
00180     if(!HasVertex(from) || !HasVertex(to)) return 0;
00181 
00182     ddVertex<WT> * FromV = VA[from], * ToV = VA[to];
00183     Edge eF; eF.V = FromV;
00184     Edge eT; eT.V = ToV;
00185     return (FromV->OutE.In(eT) && ToV->InE.In(eF));
00186 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!HasVertex@{HasVertex}}
\index{HasVertex@{HasVertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Has\-Vertex (int {\em n}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a10}




Definition at line 171 of file ddgraph.inc.\footnotesize\begin{verbatim}00172   { return (Data.count(n)>0); }
00173 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!HasVertex@{HasVertex}}
\index{HasVertex@{HasVertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Has\-Vertex (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a9}




Definition at line 167 of file ddgraph.inc.

Referenced by Add\-Edge(), Add\-Vertex(), sd\-Graph::Copy(), Degree(), Get\-Vertex(), Get\-Vertex\-Id(), Get\-Weight(), Has\-Edge(), In\-Degree(), Out\-Degree(), Rem\-Edge(), Rem\-Edges(), Rem\-In\-Edges(), Rem\-Out\-Edges(), Rem\-Vertex(), and Constraint\-Manager::remove().\footnotesize\begin{verbatim}00168   { return (VA.count(x)>0); }
00169 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!InDegree@{InDegree}}
\index{InDegree@{InDegree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int dd\-Graph$<$DT, WT$>$::In\-Degree (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_c1}


\index{ddGraph@{dd\-Graph}!InDegree@{InDegree}}
\index{InDegree@{InDegree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::In\-Degree (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a13}




Definition at line 197 of file ddgraph.inc.\footnotesize\begin{verbatim}00198   {
00199     if(!HasVertex(x)) return VertexNotInG;
00200     ddVertex<WT>* vert = VA[x];
00201     return vert->InDegree();
00202 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Input@{Input}}
\index{Input@{Input}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Input (istream \& {\em is})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a41}




Definition at line 512 of file ddgraph.inc.\footnotesize\begin{verbatim}00513   {
00514     //
00515     int id, from_id, to_id;
00516     DT data;
00517     WT weight;
00518     ddVertex<WT> * new_v, * from, * to;
00519     VertexArray::iterator it;
00520     DynString str;
00521 
00522     map<int,int> IdToOcc;
00523         // Keeps track of vertex Id occurrences.
00524 
00525     map<int, ddVertex<WT>* > IdToPtr;
00526         // Keeps a mapping of the id's to their vertices.
00527 
00528     // First we need to delete everything in the graph.
00529     Clear();
00530 
00531     int error = 0;
00532     int re_id = 0;
00533 
00534     // Skip any space before the beginning vertex delimiter:
00535     for(is >> str; str != V_BEGIN_DELIM; is >> str);
00536 
00537     // Read in the vertices until another delimiter is encountered:
00538     for(is >> str; str != V_END_DELIM; is >> str)
00539       {
00540         // The string should now contain an id and the next information
00541         // in the stream should contain the data item:
00542         //
00543         id = str.ToInt();
00544         if(is.eof() || is.bad()) { error = 1; break; }
00545         is >> data;
00546 
00547         if(id < 0) re_id = 1;
00548 
00549         // See if this id has already been used.  If it hasnt, record that
00550         // we've seen it, then create it and place it in the array.
00551         //
00552         if(IdToOcc.count(id)>0) { error = 1; break; }
00553         IdToOcc[id] = NumV;
00554         new_v = new ddVertex<WT>(id);
00555 
00556         Data[id] = data;
00557         VA[data] = new_v;
00558         IdToPtr[id] = new_v;
00559 
00560         ++NumV;
00561       }
00562 
00563     // Read-in the edges.
00564     //
00565     int done = 0;
00566     if(!error)
00567       {
00568         // Again, skip any space before the edge delimiter is encountered:
00569         for(is >> str; str != E_BEGIN_DELIM; is >> str);
00570 
00571         while(1)
00572           {
00573             for(int i=0; i<3; ++i)
00574               {
00575                 if(is.eof() || is.bad()) done = 1;
00576                 is >> str;
00577                 if((str == E_END_DELIM) || done)
00578                   {
00579                     done = 1;
00580                     if(i != 0) error = 1;
00581                     break;
00582                   }
00583                 if(i == 0)      from_id = str.ToInt();  // get first v's id.
00584                 else if(i == 1) to_id   = str.ToInt();  // get secnd v's id.    
00585                 else            weight  = str.ToDbl();  // get the weight.
00586               }
00587              if(error || done) break;
00588 
00589             // Check if the id's are valid.
00590             if(IdToPtr.count(from_id)<1 || IdToPtr.count(to_id)<1)
00591               { error = 1; break; }
00592             
00593             from = IdToPtr[from_id];
00594             to   = IdToPtr[to_id];
00595 
00596             if(AddEdge(from,to,weight,weight) < 0) 
00597                 { error = 1; break; }
00598           }
00599 
00600         // Re-assign the ID's if bad ID's were encountered.
00601         //
00602         if(!error)
00603           {
00604             if(re_id) 
00605               {
00606                 for(it = VA.begin(); it!=VA.end(); ++it)
00607                     (($\ast$it).second)->ID = IdToOcc[(($\ast$it).second)->ID];
00608               }
00609             return 1;
00610           }
00611         // 
00612       }
00613 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!MAKE_IO_STREAM_OPERATORS@{MAKE\_\-IO\_\-STREAM\_\-OPERATORS}}
\index{MAKE_IO_STREAM_OPERATORS@{MAKE\_\-IO\_\-STREAM\_\-OPERATORS}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ dd\-Graph$<$DT, WT$>$::MAKE\_\-IO\_\-STREAM\_\-OPERATORS ({\bf DDG})}\label{class_ddGraph_a42}


\index{ddGraph@{dd\-Graph}!NextFreeId@{NextFreeId}}
\index{NextFreeId@{NextFreeId}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Next\-Free\-Id () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a15}




Definition at line 213 of file ddgraph.inc.\footnotesize\begin{verbatim}00214   { return IDG.Peek(); }
00215 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!NumEdges@{NumEdges}}
\index{NumEdges@{NumEdges}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Num\-Edges () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a8}




Definition at line 163 of file ddgraph.inc.\footnotesize\begin{verbatim}00164   { return NumE; }
00165 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!NumVertices@{NumVertices}}
\index{NumVertices@{NumVertices}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Num\-Vertices () const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a7}




Definition at line 159 of file ddgraph.inc.

Referenced by Constraint\-Manager::Number(), Constraint\-Manager::clear\-All\-Constraints(), Constraint\-Manager::clear\-Constraints(), and Constraint\-Manager::set\-Molecule().\footnotesize\begin{verbatim}00160   { return NumV; }
00161 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!OutDegree@{OutDegree}}
\index{OutDegree@{OutDegree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int dd\-Graph$<$DT, WT$>$::Out\-Degree (const {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_c0}


\index{ddGraph@{dd\-Graph}!OutDegree@{OutDegree}}
\index{OutDegree@{OutDegree}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Out\-Degree (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a12}




Definition at line 189 of file ddgraph.inc.\footnotesize\begin{verbatim}00190   {
00191     if(!HasVertex(x)) return VertexNotInG;
00192     ddVertex<WT>* vert = VA[x];
00193     return vert->OutDegree();
00194 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!Output@{Output}}
\index{Output@{Output}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Output (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a40}




Definition at line 489 of file ddgraph.inc.\footnotesize\begin{verbatim}00490   {
00491     VertexArray::const_iterator it;
00492     // Print the ID and data of all the vertices:
00493     //
00494     os << V_BEGIN_DELIM << '\n';
00495     for(it = VA.begin(); it!=VA.end(); ++it)
00496         os << '\t' << ((*it).second)->ID << '\t' << ($\ast$it).first << '\n';
00497     os << V_END_DELIM << '\n';
00498 
00499     // Print the edges of the vertices
00500     //
00501     os << E_BEGIN_DELIM << '\n';
00502     for(it = VA.begin(); it!=VA.end(); ++it)
00503       {
00504         if(($\ast$it).second) (($\ast$it).second)->PrintOutEdges(os);
00505       }
00506 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!OutputSimple@{OutputSimple}}
\index{OutputSimple@{OutputSimple}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ void dd\-Graph$<$DT, WT$>$::Output\-Simple (ostream \& {\em os})}\label{class_ddGraph_a39}


\index{ddGraph@{dd\-Graph}!RemEdge@{RemEdge}}
\index{RemEdge@{RemEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Rem\-Edge ({\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em from}, {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em to})\hspace{0.3cm}{\tt  [inline, private]}}\label{class_ddGraph_c4}




Definition at line 458 of file ddgraph.inc.\footnotesize\begin{verbatim}00459   {
00460     if(NumE<=0) return NoEdges;
00461     if(!from || !to)
00462         return VertexBad;
00463 
00464     Edge eF, eT;
00465     eF.V = from; eT.V = to;
00466 
00467     from->OutE.Remove(eT);
00468     to->InE.Remove(eF);
00469     return --NumE;
00470 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!RemEdge@{RemEdge}}
\index{RemEdge@{RemEdge}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Rem\-Edge (const DT \& {\em from}, const DT \& {\em to})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a36}




Definition at line 473 of file ddgraph.inc.\footnotesize\begin{verbatim}00474   {
00475     ddVertex<WT> * FromV, * ToV;
00476 
00477     if(NumV<=0) return NoVertices;
00478     if(NumE<=0) return NoEdges;
00479 
00480     if(!HasVertex(from) || !HasVertex(to))
00481         return VertexNotInG;
00482 
00483     FromV = VA[from];
00484     ToV = VA[to];
00485     return RemEdge(FromV,ToV);
00486 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!RemEdges@{RemEdges}}
\index{RemEdges@{RemEdges}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Rem\-Edges (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a34}




Definition at line 413 of file ddgraph.inc.\footnotesize\begin{verbatim}00414   {
00415     if(!HasVertex(x))
00416       { cerr << "ddGraph::Remdges\n"; raise(SIGQUIT); }
00417 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!RemInEdges@{RemInEdges}}
\index{RemInEdges@{RemInEdges}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Rem\-In\-Edges (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a33}




Definition at line 404 of file ddgraph.inc.\footnotesize\begin{verbatim}00405   {
00406     if(!HasVertex(x))
00407       { cerr << "ddGraph::RemInEdges\n"; raise(SIGQUIT); }
00408 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!RemOutEdges@{RemOutEdges}}
\index{RemOutEdges@{RemOutEdges}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Rem\-Out\-Edges (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a32}




Definition at line 395 of file ddgraph.inc.\footnotesize\begin{verbatim}00396   {
00397     if(!HasVertex(x))
00398       { cerr << "ddGraph::RemOutEdges\n"; raise(SIGQUIT); }
00399 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!RemVertex@{RemVertex}}
\index{RemVertex@{RemVertex}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int dd\-Graph$<$ DT, WT $>$::Rem\-Vertex (const DT \& {\em x})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a35}




Definition at line 422 of file ddgraph.inc.

Referenced by Constraint\-Manager::remove().\footnotesize\begin{verbatim}00423   {
00424     if(NumV <= 0) return NoVertices;
00425 
00426     // ddVertex<WT> doesn't exist in the graph.
00427     if(!HasVertex(x))
00428         return VertexNotInG;
00429 
00430     ddVertex<WT>* vert = VA[x];
00431     if(!vert) return VertexBad;
00432 
00433     //
00434     // Clear all its edges and the edges it shares with other vertices.
00435     //
00436     NumE -= vert->Degree();
00437 
00438     //
00439     // Remove the vertex from the array.
00440     //
00441     VA.erase(x);
00442     Data.erase(vert->ID);
00443 
00444     //
00445     // Recycle this vertex's ID
00446     //
00447     IDG.Free(vert->ID);
00448 
00449     //
00450     // And finally, delete the vertex from existence.
00451     //
00452     delete vert;
00453 
00454     return --NumV;
00455 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!SetWeight@{SetWeight}}
\index{SetWeight@{SetWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Set\-Weight ({\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em from}, {\bf dd\-Vertex}$<$ WT $>$ $\ast$ {\em to}, const WT \& {\em fwd\_\-weight}, const WT \& {\em bwd\_\-weight})\hspace{0.3cm}{\tt  [inline, private]}}\label{class_ddGraph_c5}




Definition at line 343 of file ddgraph.inc.\footnotesize\begin{verbatim}00345   {
00346     if(!from || !to) 
00347       { cerr << "ddGraph::SetWeight\n"; raise(SIGQUIT); }
00348 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!SetWeight@{SetWeight}}
\index{SetWeight@{SetWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Set\-Weight (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a29}




Definition at line 362 of file ddgraph.inc.\footnotesize\begin{verbatim}00364   { SetWeight(from,to,weight,weight); }
00365 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!SetWeight@{SetWeight}}
\index{SetWeight@{SetWeight}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void dd\-Graph$<$ DT, WT $>$::Set\-Weight (const DT \& {\em from}, const DT \& {\em to}, const WT \& {\em fwd\_\-weight}, const WT \& {\em bwd\_\-weight})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a28}




Definition at line 353 of file ddgraph.inc.

Referenced by Set\-Weight().\footnotesize\begin{verbatim}00355   {
00356     if(!HasEdge(from,to)) 
00357       { cerr << "ddGraph::SetWeight\n"; raise(SIGQUIT); }
00358 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!operator()@{operator()}}
\index{operator()@{operator()}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const WT \& dd\-Graph$<$ DT, WT $>$::operator() (const DT \& {\em from}, const DT \& {\em to}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a27}




Definition at line 391 of file ddgraph.inc.\footnotesize\begin{verbatim}00392   { return GetWeight(from,to); }
00393 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!operator=@{operator=}}
\index{operator=@{operator=}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const dd\-Graph$<$ DT, WT $>$ \& dd\-Graph$<$ DT, WT $>$::operator= (const {\bf sd\-Graph}$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a38}




Definition at line 627 of file ddgraph.inc.\footnotesize\begin{verbatim}00628   { Copy(sdg); return *this; }
00629 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!operator=@{operator=}}
\index{operator=@{operator=}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const dd\-Graph$<$ DT, WT $>$ \& dd\-Graph$<$ DT, WT $>$::operator= (const dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [inline]}}\label{class_ddGraph_a37}




Definition at line 623 of file ddgraph.inc.\footnotesize\begin{verbatim}00624   { Copy(ddg); return *this; }
00625 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{ddGraph@{dd\-Graph}!InputBinary@{InputBinary}}
\index{InputBinary@{InputBinary}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ istream\& Input\-Binary (istream \& {\em is}, dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [friend]}}\label{class_ddGraph_l1}




Definition at line 632 of file ddgraph.inc.\footnotesize\begin{verbatim}00633   {
00634     sdGraph<DT,WT> G;
00635     if(InputBinary(is,G).bad())
00636         return is;
00637     ddg = G;
00638     return is;
00639 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!OutputBinary@{OutputBinary}}
\index{OutputBinary@{OutputBinary}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ ostream\& Output\-Binary (ostream \& {\em os}, const dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [friend]}}\label{class_ddGraph_l3}




Definition at line 642 of file ddgraph.inc.\footnotesize\begin{verbatim}00643   {
00644     sdGraph<DT,WT> G(ddg);
00645     return OutputBinary(os,G);
00646 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!operator@{operator}}
\index{operator@{operator}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ ostream\& operator (ostream \& {\em os}, const dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [friend]}}\label{class_ddGraph_l4}


\index{ddGraph@{dd\-Graph}!operator>=@{operator$>$=}}
\index{operator>=@{operator$>$=}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ istream\& operator$>$= (istream \& {\em is}, dd\-Graph$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [friend]}}\label{class_ddGraph_l2}




Definition at line 649 of file ddgraph.inc.\footnotesize\begin{verbatim}00650   { return IntputBinary(is,ddg); }
00651 \end{verbatim}\normalsize 
\index{ddGraph@{dd\-Graph}!sdGraph< DT, WT >@{sdGraph$<$ DT, WT $>$}}
\index{sdGraph< DT, WT >@{sdGraph$<$ DT, WT $>$}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ class {\bf sd\-Graph}\hspace{0.3cm}{\tt  [friend]}}\label{class_ddGraph_l0}




Definition at line 73 of file ddgraph.h.

\subsection{Member Data Documentation}
\index{ddGraph@{dd\-Graph}!Data@{Data}}
\index{Data@{Data}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf Data\-Array} dd\-Graph$<$DT, WT$>$::Data\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_o4}




Definition at line 192 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!IDG@{IDG}}
\index{IDG@{IDG}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf Id\-Gen} dd\-Graph$<$DT, WT$>$::IDG\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_o0}




Definition at line 177 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!NumE@{NumE}}
\index{NumE@{NumE}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int dd\-Graph$<$DT, WT$>$::Num\-E\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_o2}




Definition at line 181 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!NumV@{NumV}}
\index{NumV@{NumV}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int dd\-Graph$<$DT, WT$>$::Num\-V\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_o1}




Definition at line 179 of file ddgraph.h.\index{ddGraph@{dd\-Graph}!VA@{VA}}
\index{VA@{VA}!ddGraph@{dd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf Vertex\-Array} dd\-Graph$<$DT, WT$>$::VA\hspace{0.3cm}{\tt  [private]}}\label{class_ddGraph_o3}




Definition at line 187 of file ddgraph.h.

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