\section{sd\-Graph  Class Template Reference}
\label{class_sdGraph}\index{sdGraph@{sd\-Graph}}
{\tt \#include $<$sdgraph.h$>$}

Collaboration diagram for sd\-Graph:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=101pt]{class_sdGraph_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf sd\-Graph} ()
\item 
{\bf sd\-Graph} (const sd\-Graph$<$ DT, WT $>$ \&sdg)
\item 
{\bf sd\-Graph} ({\bf dd\-Graph}$<$ DT, WT $>$ \&ddg, bool Keep\-Ids=false)
\item 
{\bf $\sim$sd\-Graph} ()
\item 
int {\bf Num\-Vertices} () const
\item 
int {\bf Num\-Edges} () const
\item 
void {\bf Copy} (const sd\-Graph$<$ DT, WT $>$ \&sdg)
\item 
void {\bf Copy} ({\bf dd\-Graph}$<$ DT, WT $>$ \&ddg, bool Keep\-Ids=false)
\item 
const sd\-Graph$<$DT,WT$>$\& {\bf operator=} (const sd\-Graph$<$ DT, WT $>$ \&sdg)
\item 
const sd\-Graph$<$DT,WT$>$\& {\bf operator=} (const {\bf dd\-Graph}$<$ DT, WT $>$ \&ddg)
\item 
int {\bf Get\-Vertex\-Index} (const DT \&x) const
\item 
int {\bf Has\-Vertex} (const DT \&x) const
\item 
int {\bf Has\-Edge} (int i, int j) const
\item 
int {\bf Out\-Degree} (int i) const
\item 
int {\bf In\-Degree} (int i) const
\item 
int {\bf Degree} (int i) const
\item 
const {\bf sd\-Vertex}$<$WT$>$\& {\bf Get\-Vertex} (int i) const
\item 
{\bf sd\-Vertex}$<$WT$>$\& {\bf Get\-Vertex} (int i)
\item 
const {\bf sd\-Vertex}$<$WT$>$\& {\bf operator[$\,$]} (int i) const
\item 
{\bf sd\-Vertex}$<$WT$>$\& {\bf operator[$\,$]} (int i)
\item 
const DT\& {\bf Get\-Data} (int i) const
\item 
DT\& {\bf Get\-Data} (int i)
\item 
const DT\& {\bf operator()} (int i) const
\item 
DT\& {\bf operator()} (int i)
\item 
const WT\& {\bf Get\-Weight} (int i, int j, int alt=0) const
\item 
WT\& {\bf Get\-Weight} (int i, int j, int alt=0)
\item 
const WT\& {\bf operator()} (int i, int j, int alt=0) const
\item 
WT\& {\bf operator()} (int i, int j, int alt=0)
\item 
sd\-Graph$<$DT,WT$>$ {\bf Sub\-Graph} (const {\bf SDG\_\-Set\-Int} \&vertset) const
\item 
int {\bf Output} (ostream \&os) const
\item 
int {\bf Input} (istream \&is)
\item 
ostream\& {\bf Print\-Dotty} (ostream \&os, int edges=0) const
\item 
{\bf KAdj\-Mat} {\bf Adj\-Matrix} () const
\item 
{\bf KAdj\-Mat}$\ast$ {\bf Trav\-Matrices} (int src, int k, {\bf KAdj\-Mat} $\ast$P=0) const
\item 
{\bf SDG\_\-Int\-List}$\ast$$\ast$ {\bf Trav\-Lists} (int src, int k, {\bf KAdj\-Mat} $\ast$P=0) const
\item 
int {\bf Input\-Binary} (istream \&is)
\item 
int {\bf Output\-Binary} (ostream \&os) const
\item 
{\bf neighbor\_\-iterator} {\bf begin\_\-neighbor} (int vndx=0, int rev=0)
\item 
{\bf df\_\-iterator} {\bf begin\_\-df} (int vndx=0, int rev=0)
\item 
{\bf bf\_\-iterator} {\bf begin\_\-bf} (int vndx=0, int rev=0)
\item 
{\bf path\_\-iterator} {\bf begin\_\-path} (int src, int tgt, int len, {\bf DLList}$<$ int $>$ $\ast$const $\ast$tl=0, int($\ast$filter)(const sd\-Graph$<$ DT, WT $>$ \&graph, const int $\ast$path, int ndx, int pathlen, void $\ast$arbitrary\_\-criteria)=0, void $\ast$criteria=0)
\item 
{\bf j\-Vector} {\bf Dijkstra} (int vndx=0, int rev=0, int wc=0, int $\ast$pred=0) const
\item 
int {\bf DFTime\-Stamps} (int $\ast$discover, int $\ast$finish, int rev=0) const
\item 
{\bf SDG\_\-Set\-Set\-Int} {\bf SCC} () const
\item 
{\bf SDG\_\-Set\-Set\-Int} {\bf Strongly\-Connected\-Components} () const
\item 
sd\-Graph$<$DT,WT$>$ {\bf SCCGraph} () const
\item 
int {\bf Num\-SCC} () const
\end{CompactItemize}
\subsection*{Private Methods}
\begin{CompactItemize}
\item 
void {\bf Clear} ()
\item 
int {\bf Valid\-Vertex} (int i) const
\item 
int {\bf Valid\-Data} (int i) const
\item 
int {\bf Out\-Degree} (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
int {\bf In\-Degree} (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
int {\bf Degree} (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$vert) const
\item 
void {\bf DF\_\-Visit} (int u, {\bf sdg\_\-color} $\ast$color, int $\ast$time, int $\ast$discover, int $\ast$finish, {\bf SDG\_\-Set\-Int} $\ast$treemembers, int rev) const
\item 
int {\bf Initialize\_\-Single\_\-Source} (int vndx, {\bf j\-Vector} \&D, int $\ast$P) const
\item 
void {\bf Relax} (int u, int v, {\bf j\-Vector} \&D, int $\ast$P, int rev, int wc) const
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
int {\bf Num\-V}
\item 
int {\bf Num\-E}
\item 
{\bf sd\-Vertex}$<$WT$>$$\ast$$\ast$ {\bf VA}
\item 
DT$\ast$ {\bf Data}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf dd\-Graph$<$ DT, WT $>$}
\item 
istream\& {\bf operator$>$=} (istream \&is, sd\-Graph$<$ DT, WT $>$ \&sdg)
\item 
ostream\& {\bf operator} (ostream \&os, const sd\-Graph$<$ DT, WT $>$ \&sdg)
\end{CompactItemize}
\subsubsection*{template$<$class DT, class WT = double$>$  class sd\-Graph}



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




Definition at line 308 of file sdgraph.inc.\footnotesize\begin{verbatim}00309   {
00310     NumV = 0;
00311     NumE = 0;
00312     VA   = 0;
00313     Data = 0;
00314 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!sdGraph@{sdGraph}}
\index{sdGraph@{sdGraph}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ sd\-Graph$<$ DT, WT $>$::sd\-Graph$<$DT, WT$>$ (const sd\-Graph$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a1}




Definition at line 317 of file sdgraph.inc.\footnotesize\begin{verbatim}00318   {
00319     NumV = 0;
00320     NumE = 0;
00321     VA = 0;
00322     Data = 0;
00323     Copy(sdg);
00324 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!sdGraph@{sdGraph}}
\index{sdGraph@{sdGraph}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ sd\-Graph$<$ DT, WT $>$::sd\-Graph$<$DT, WT$>$ ({\bf dd\-Graph}$<$ DT, WT $>$ \& {\em ddg}, bool {\em Keep\-Ids} = false)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a2}




Definition at line 328 of file sdgraph.inc.\footnotesize\begin{verbatim}00329   {
00330     NumV = 0;
00331     NumE = 0;
00332     VA = 0;
00333     Data = 0;
00334     Copy(ddg, KeepIds);
00335 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!~sdGraph@{$\sim$sdGraph}}
\index{~sdGraph@{$\sim$sdGraph}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ sd\-Graph$<$ DT, WT $>$::$\sim$sd\-Graph$<$DT, WT$>$ ()\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a3}




Definition at line 338 of file sdgraph.inc.\footnotesize\begin{verbatim}00339   { Clear(); }
00340 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{sdGraph@{sd\-Graph}!AdjMatrix@{AdjMatrix}}
\index{AdjMatrix@{AdjMatrix}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf KAdj\-Mat} sd\-Graph$<$ DT, WT $>$::Adj\-Matrix () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a32}




Definition at line 665 of file sdgraph.inc.

Referenced by Trav\-Lists(), and Trav\-Matrices().\footnotesize\begin{verbatim}00666   {
00667     KAdjMat A(NumV);
00668     for(int i=0; i<NumV; ++i)
00669         for(int j=0; j<VA[i]->NumO; ++j)
00670             A.Connect(i, VA[i]->OutE[j].V->ID);
00671     return A;
00672 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Clear@{Clear}}
\index{Clear@{Clear}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void sd\-Graph$<$ DT, WT $>$::Clear ()\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c0}




Definition at line 14 of file sdgraph.inc.

Referenced by Copy(), Input\-Binary(), and $\sim$sd\-Graph().\footnotesize\begin{verbatim}00015   {
00016     for(int i=0; i<NumV; ++i)
00017         delete VA[i];
00018     if(VA) { delete[] VA; VA = 0; }
00019     if(Data) { delete[] Data; Data = 0; }
00020 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Copy@{Copy}}
\index{Copy@{Copy}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void sd\-Graph$<$ DT, WT $>$::Copy ({\bf dd\-Graph}$<$ DT, WT $>$ \& {\em ddg}, bool {\em Keep\-Ids} = false)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a7}




Definition at line 68 of file sdgraph.inc.\footnotesize\begin{verbatim}00069   {
00070     int numout, numin, ndx, current, neighbor;
00071     map< int, int > IdMap;
00072     map< DT, int > DataMap;
00073     sdVertex<WT> ** VA_tmp=0;
00074 
00075     map<DT, ddVertex<WT>* >::const_iterator dynvert_it;
00076     set<ddEdge<WT> >::const_iterator eit;
00077     ddVertex<WT> * vert=0;
00078     ddEdge<WT> edge;
00079 
00080     // Delete everything everything:
00081     //
00082     Clear();
00083 
00084     if(ddg.NumV<1) return;
00085 
00086     // Try to allocate space to hold all of the vertices and the data:
00087     //
00088     if(!(VA = new sdVertex<WT>*[ddg.NumV])) return;
00089 
00090     if(!(Data = new DT[ddg.NumV]))
00091       { delete[] VA; VA = 0; return; }
00092 
00093     // Temporary vertex storage:
00094     //
00095     if(!(VA_tmp = new sdVertex<WT>*[ddg.NumV]))
00096       { delete[] VA; delete[] Data; VA = 0; Data = 0; return; }
00097 
00098     NumV = ddg.NumV;
00099 
00100     // Initialize the vertices:
00101     //
00102     for(int i=0; i<NumV; ++i) VA[i] = 0;
00103 
00104     // First, we need to loop through all the vertices in the dynamic graph
00105     // and find out how many edges each of them has (so we can create 
00106     // enough space to hold everything.  While we're doing that, we might
00107     // as well copy the data into the static vertices.
00108     //
00109     int v=0;
00110 
00111     if (KeepIds){
00112       int MinVertex = v;  // idgen has no interface for this -- assume zero
00113       int MaxVertex = ddg.IDG.Max();
00114 
00115       // next 12 lines are repetitive, and should be integrated w/ above -jd
00116       NumV = MaxVertex+1;
00117 
00118       delete [] VA;
00119       VA = new sdVertex<WT>*[NumV];
00120 
00121       delete [] Data;
00122       Data = Data = new DT[NumV];
00123 
00124       delete [] VA_tmp;
00125       VA_tmp = new sdVertex<WT>*[NumV];
00126 
00127       for(int i=0; i<NumV; ++i) VA[i] = 0;
00128       
00129       //      for(dynvert_it = ddg.VA.begin(); dynvert_it!=ddg.VA.end(); ++dynvert_it)
00130       for(int VertexNumber = MinVertex; VertexNumber < MaxVertex+1; VertexNumber ++)
00131         {
00132           if(v==NumV)
00133             {
00134               // This is an error condition:  the dynamic graph told us there
00135               // were only NumV vertices but here we are getting the NumV+1'th!
00136               //
00137               break;
00138             }
00139 
00140           if (ddg.HasVertex(VertexNumber)) {
00141               
00142             //    Data[v] = (*dynvert_it).first;
00143             Data[v] = ddg.GetData(VertexNumber);
00144             
00145             //    vert = (*dynvert_it).second;
00146             vert = ddg.GetVertex(Data[v]); //discards const on copy function ?? -jd 
00147               
00148             // Find out how many outbound and inbound edges this vertex has:
00149             //
00150             numout = vert->OutDegree();
00151             numin  = vert->InDegree();
00152             
00153             // Create the vertex:
00154             //
00155             //      VA_tmp[v] = new sdVertex<WT>(vert->ID, numout, numin);
00156             VA_tmp[v] = new sdVertex<WT>(VertexNumber, numout, numin);
00157             
00158             // Remember that this data was associated with the v_th vertex:
00159             //
00160             DataMap[Data[v]] = v;
00161             
00162             // end of case where vertex VertexNumber' exists in ddg
00163           }         else            {
00164             // case where vertex VertexNumber' does not exist in ddg
00165             Data[v] = 0;
00166             VA_tmp[v] = new sdVertex<WT>(VertexNumber, 0, 0);
00167             DataMap[Data[v]] = -1;
00168           }
00169           
00170           v++;
00171         }
00172       
00173       // NB sorting routine has been removed (!)
00174       // this may effect other routines on sDgraphs
00175       // if sorting does not occur.   -jd
00176       
00177       for(v=0; v<NumV; ++v)
00178         {
00179           ndx = DataMap[Data[v]];
00180           VA[v] = VA_tmp[ndx];
00181 
00182           // This allows us to resolve where edges point:
00183           //
00184           IdMap[VA[v]->ID] = v;
00185 
00186           // Now set the new id simply to its index in the array:
00187           //
00188           VA[v]->ID = v;
00189         }
00190       delete[] VA_tmp;
00191          
00192 
00193     } else { // default:  do not keep same IDs
00194     
00195       for(dynvert_it = ddg.VA.begin(); dynvert_it!=ddg.VA.end(); ++dynvert_it)
00196         {
00197           if(v==NumV)
00198             {
00199               // This is an error condition:  the dynamic graph told us there
00200               // were only NumV vertices but here we are getting the NumV+1'th!
00201               //
00202               break;
00203             }
00204 
00205           Data[v] = ($\ast$dynvert_it).first;
00206           vert = ($\ast$dynvert_it).second;
00207 
00208           // Find out how many outbound and inbound edges this vertex has:
00209           //
00210           numout = vert->OutDegree();
00211           numin  = vert->InDegree();
00212 
00213           // Create the vertex:
00214           //
00215           VA_tmp[v] = new sdVertex<WT>(vert->ID, numout, numin);
00216 
00217           // Remember that this data was associated with the v_th vertex:
00218           //
00219           DataMap[Data[v]] = v;
00220 
00221           v++;
00222         }
00223     
00224       // Now that all the vertices are created we can sort the data and then
00225       // rearrange the vertices (to match up with their respective data):
00226       //
00227       QuickSort(Data, NumV);
00228       for(v=0; v<NumV; ++v)
00229         {
00230           ndx = DataMap[Data[v]];
00231           VA[v] = VA_tmp[ndx];
00232 
00233           // This allows us to resolve where edges point:
00234           //
00235           IdMap[VA[v]->ID] = v;
00236 
00237           // Now set the new id simply to its index in the array:
00238           //
00239           VA[v]->ID = v;
00240         }
00241       delete[] VA_tmp;
00242       
00243     } // end default case -- do not keep same IDs -jd
00244     
00245     // Now copy in all the edges.  This involves iterating through all the
00246     // vertices from the dynamic graph again and copying the edges into
00247     // the appropriate vertex.
00248     //
00249 
00250     int e;
00251     for(dynvert_it = ddg.VA.begin(); dynvert_it!=ddg.VA.end(); ++dynvert_it)
00252       {
00253         // Get the vertex pointer and then find out where the corresponding
00254         // vertex is located in the static array:
00255         //
00256         vert = ($\ast$dynvert_it).second;
00257         current = IdMap[vert->ID];
00258 
00259         // Iterate through the outbound edges
00260         //
00261         e = 0;
00262         for(eit=vert->OutE.begin(); eit!=vert->OutE.end(); ++eit)
00263           {
00264             // Get the edge and then find out the index (in the static array)
00265             // of the vertex this edge refers to:
00266             //
00267             edge     = *eit;
00268             neighbor = IdMap[edge.V->ID];
00269 
00270             // Add the edge to this vertex:
00271             //
00272             VA[current]->OutE[e].V = VA[neighbor];
00273             VA[current]->OutE[e].W = edge.W;
00274             e++;
00275           }
00276 
00277         // Iterate through the inbound edges
00278         //
00279         e = 0;
00280         for(eit=vert->InE.begin(); eit!=vert->InE.end(); ++eit)
00281           {
00282             edge     = *eit;
00283             neighbor = IdMap[edge.V->ID];
00284 
00285             // Add the to<-from edge to this vertex:
00286             //
00287             VA[current]->InE[e].V = VA[neighbor];
00288             VA[current]->InE[e].W = edge.W;
00289             e++;
00290           }
00291 
00292         // Sort the edges:
00293         //
00294         VA[current]->SortEdges();
00295       }
00296 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Copy@{Copy}}
\index{Copy@{Copy}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void sd\-Graph$<$ DT, WT $>$::Copy (const sd\-Graph$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a6}




Definition at line 25 of file sdgraph.inc.

Referenced by operator=(), and sd\-Graph().\footnotesize\begin{verbatim}00026   {
00027     if(this == &sdg) return;
00028 
00029     // Delete everything:
00030     //
00031     Clear();
00032 
00033     if(sdg.NumV<1) return;
00034     if(!(VA = new sdVertex<WT>*[sdg.NumV])) return;
00035     if(!(Data = new DT[sdg.NumV]))
00036       { delete[] VA; VA = 0; return; }
00037 
00038     // Copy the vertices.
00039     for(int v=0; v<sdg.NumV; ++v)
00040         if(!(VA[v] = new sdVertex<WT>(sdg.VA[v]->ID, sdg.VA[v]->NumO, sdg.VA[v]->NumI)))
00041             { cerr << "sdGraph::Copy\n"; raise(SIGQUIT); }
00042 
00043     // Copy the edges.
00044     for(int v=0; v<sdg.NumV; ++v)
00045       {
00046         // Copy the outbound edges in.
00047         for(int e=0; e<sdg.VA[v]->NumO; ++e)
00048           {
00049             VA[v]->OutE[e].V = VA[(sdg.VA[v]->OutE[e].V->ID)];
00050             VA[v]->OutE[e].W = sdg.VA[v]->OutE[e].W;
00051           }
00052 
00053         // Copy the inbound edges in.
00054         for(int e=0; e<sdg.VA[v]->NumI; ++e)
00055           {
00056             VA[v]->InE[e].V = VA[(sdg.VA[v]->InE[e].V->ID)];
00057             VA[v]->InE[e].W = sdg.VA[v]->InE[e].W;
00058           }
00059 
00060         Data[v] = sdg.Data[v];
00061       }
00062 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!DFTimeStamps@{DFTimeStamps}}
\index{DFTimeStamps@{DFTimeStamps}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::DFTime\-Stamps (int $\ast$ {\em discover}, int $\ast$ {\em finish}, int {\em rev} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a42}




Definition at line 107 of file sdgalg.inc.

Referenced by SCC().\footnotesize\begin{verbatim}00108   {
00109     if(NumV<1) return 0;
00110 
00111     int time = -1;
00112 
00113     // Color all the vertices white to mark them as unvisited:
00114     //
00115     sdg_color color[NumV];
00116     for(int u=0; u<NumV; ++u)
00117         color[u] = sdg_white;
00118     
00119     for(int u=0; u<NumV; ++u)
00120         if(color[u] == sdg_white)
00121             DF_Visit(u, color, &time, discover, finish, 0, rev);
00122     return 1;
00123 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!DF_Visit@{DF\_\-Visit}}
\index{DF_Visit@{DF\_\-Visit}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void sd\-Graph$<$ DT, WT $>$::DF\_\-Visit (int {\em u}, {\bf sdg\_\-color} $\ast$ {\em color}, int $\ast$ {\em time}, int $\ast$ {\em discover}, int $\ast$ {\em finish}, {\bf SDG\_\-Set\-Int} $\ast$ {\em treemembers}, int {\em rev}) const\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c6}




Definition at line 69 of file sdgalg.inc.

Referenced by DFTime\-Stamps(), and SCC().\footnotesize\begin{verbatim}00072   {
00073     color[u] = sdg_gray;        // vertex u has just been discovered.
00074     if(treemembers)
00075        treemembers->insert(u);
00076        // treemembers->Add(u);
00077 
00078     if(discover && time)
00079         discover[u] = ++($\ast$time);
00080 
00081     int v;
00082     // Explore edge u-v:
00083     if(!rev)
00084       {
00085         for(int i=0; i<VA[u]->NumO; ++i)
00086           {
00087             v = VA[u]->OutE[i].V->ID;
00088             if(color[v] == sdg_white)
00089                 DF_Visit(v, color, time, discover, finish, treemembers, rev);
00090           }
00091       }
00092     else
00093       {
00094         for(int i=0; i<VA[u]->NumI; ++i)
00095           {
00096             v = VA[u]->InE[i].V->ID;
00097             if(color[v] == sdg_white)
00098                 DF_Visit(v, color, time, discover, finish, treemembers, rev);
00099           }
00100       }
00101 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Degree@{Degree}}
\index{Degree@{Degree}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int sd\-Graph$<$DT, WT$>$::Degree (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_sdGraph_c5}


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




Definition at line 392 of file sdgraph.inc.\footnotesize\begin{verbatim}00393   {
00394     if(!ValidVertex(i)) 
00395       { cerr << "sdGraph::Degree\n"; raise(SIGQUIT); }
00396 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Dijkstra@{Dijkstra}}
\index{Dijkstra@{Dijkstra}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf j\-Vector} sd\-Graph$<$ DT, WT $>$::Dijkstra (int {\em vndx} = 0, int {\em rev} = 0, int {\em wc} = 0, int $\ast$ {\em pred} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a41}




Definition at line 35 of file sdgalg.inc.\footnotesize\begin{verbatim}00037   {
00038     IntPriorityQueue<double> Q(NumV,1);
00039     jVector D;
00040     int u_ndx, num_nbrs, u_nbr;
00041     double u_pri;
00042 
00043     D.Resize(NumV);
00044 
00045     Initialize_Single_Source(vndx,D,pred);
00046 
00047     // Copy all the vertices into the queue:
00048     for(int v=0; v<NumV; ++v)
00049         Q.Add(v, D[v] );
00050     
00051     while(!Q.IsEmpty())
00052       {
00053         Q.Remove(u_ndx, u_pri);
00054         D[u_ndx] = u_pri;
00055 
00056         // Relax all the neighbors of u.
00057         num_nbrs = !rev ? GetVertex(u_ndx).NumO : GetVertex(u_ndx).NumI;
00058         for(int j=0; j<num_nbrs; ++j)
00059           {
00060             u_nbr = !rev ? GetVertex(u_ndx)[j].ID : GetVertex(u_ndx)(j).ID;
00061             Relax(u_ndx, u_nbr, D, pred, rev, wc);
00062             Q.Modify(u_nbr, D[u_nbr]);
00063           }
00064       }
00065 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ DT \& sd\-Graph$<$ DT, WT $>$::Get\-Data (int {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a21}




Definition at line 432 of file sdgraph.inc.\footnotesize\begin{verbatim}00433   { 
00434     if(!ValidData(i)) 
00435       { cerr << "sdGraph::GetData\n"; cerr << NumV << ',' << i << '\n'; raise(SIGQUIT); }
00436 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetData@{GetData}}
\index{GetData@{GetData}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const DT \& sd\-Graph$<$ DT, WT $>$::Get\-Data (int {\em i}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a20}




Definition at line 424 of file sdgraph.inc.

Referenced by Constraint\-Manager::get\-Assoc\-Atoms(), Constraint\-Manager::get\-Constraint(), Constraint\-Manager::get\-Parents(), operator()(), and Constraint\-Manager::$\sim$Constraint\-Manager().\footnotesize\begin{verbatim}00425   { 
00426     if(!ValidData(i)) 
00427       { cerr << "const sdGraph::GetData\n"; cerr << i << '\n'; raise(SIGQUIT); }
00428 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetVertex@{GetVertex}}
\index{GetVertex@{GetVertex}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf sd\-Vertex}$<$ WT $>$ \& sd\-Graph$<$ DT, WT $>$::Get\-Vertex (int {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a17}




Definition at line 408 of file sdgraph.inc.\footnotesize\begin{verbatim}00409   { 
00410     if(!ValidVertex(i)) 
00411       { cerr << i << ',' << NumV << ",sdGraph::GetVertex\n"; raise(SIGQUIT); }
00412 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetVertex@{GetVertex}}
\index{GetVertex@{GetVertex}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const {\bf sd\-Vertex}$<$ WT $>$ \& sd\-Graph$<$ DT, WT $>$::Get\-Vertex (int {\em i}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a16}




Definition at line 400 of file sdgraph.inc.

Referenced by operator[$\,$]().\footnotesize\begin{verbatim}00401   { 
00402     if(!ValidVertex(i)) 
00403       { cerr << "sdGraph::GetVertex\n"; raise(SIGQUIT); }
00404 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetVertexIndex@{GetVertexIndex}}
\index{GetVertexIndex@{GetVertexIndex}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Get\-Vertex\-Index (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a10}




Definition at line 350 of file sdgraph.inc.

Referenced by Has\-Vertex().\footnotesize\begin{verbatim}00351   { return BinSearch(Data, NumV, x); }
00352 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetWeight@{GetWeight}}
\index{GetWeight@{GetWeight}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ WT \& sd\-Graph$<$ DT, WT $>$::Get\-Weight (int {\em i}, int {\em j}, int {\em alt} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a25}




Definition at line 458 of file sdgraph.inc.\footnotesize\begin{verbatim}00459   { 
00460     if(!ValidVertex(i) || !ValidVertex(j)) 
00461       { cerr << "sdGraph::GetWeight\n"; raise(SIGQUIT); }
00462 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!GetWeight@{GetWeight}}
\index{GetWeight@{GetWeight}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const WT \& sd\-Graph$<$ DT, WT $>$::Get\-Weight (int {\em i}, int {\em j}, int {\em alt} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a24}




Definition at line 448 of file sdgraph.inc.

Referenced by Relax(), and operator()().\footnotesize\begin{verbatim}00449   { 
00450     if(!ValidVertex(i) || !ValidVertex(j)) 
00451       { cerr << "sdGraph::GetWeight\n"; raise(SIGQUIT); }
00452 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!HasEdge@{HasEdge}}
\index{HasEdge@{HasEdge}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Has\-Edge (int {\em i}, int {\em j}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a12}




Definition at line 358 of file sdgraph.inc.

Referenced by path\_\-iterator::operator++().\footnotesize\begin{verbatim}00359   {
00360     // Don't have the edge if we don't have one of the vertices:
00361     //
00362     if(i<0 || i>=NumV || j<0 || j>=NumV) return 0;
00363 
00364     return VA[i]->HasEdgeTo((*VA[j]));
00365 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!HasVertex@{HasVertex}}
\index{HasVertex@{HasVertex}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Has\-Vertex (const DT \& {\em x}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a11}




Definition at line 354 of file sdgraph.inc.

Referenced by Constraint\-Manager::remove().\footnotesize\begin{verbatim}00355   { return (GetVertexIndex(x) != -1); }
00356 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!InDegree@{InDegree}}
\index{InDegree@{InDegree}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int sd\-Graph$<$DT, WT$>$::In\-Degree (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_sdGraph_c4}


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




Definition at line 384 of file sdgraph.inc.\footnotesize\begin{verbatim}00385   {
00386     if(!ValidVertex(i)) 
00387       { cerr << "sdGraph::InDegree\n"; raise(SIGQUIT); }
00388 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Initialize_Single_Source@{Initialize\_\-Single\_\-Source}}
\index{Initialize_Single_Source@{Initialize\_\-Single\_\-Source}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Initialize\_\-Single\_\-Source (int {\em vndx}, {\bf j\-Vector} \& {\em D}, int $\ast$ {\em P}) const\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c7}




Definition at line 5 of file sdgalg.inc.\footnotesize\begin{verbatim}00007   {
00008     for(int i=0; i<NumV; ++i)
00009       {
00010         D[i] = INF;
00011         if(P) P[i] = -1;
00012       }
00013 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Input@{Input}}
\index{Input@{Input}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Input (istream \& {\em is})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a30}




Definition at line 880 of file sdgraph.inc.\footnotesize\begin{verbatim}00881   { return 1; }
00882 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!InputBinary@{InputBinary}}
\index{InputBinary@{InputBinary}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Input\-Binary (istream \& {\em is})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a35}




Definition at line 769 of file sdgraph.inc.

Referenced by operator$>$=().\footnotesize\begin{verbatim}00770   {
00771     // Delete everything.
00772     //
00773     Clear();
00774 
00775     // Read in "NumV":
00776     //
00777     is >= NumV;
00778 
00779     // Read in "NumE":
00780     //
00781     is >= NumE;
00782 
00783     int vid;
00784     // Read in "VA":
00785     //
00786     if(NumV>0)
00787       {
00788         // Create the vertices:
00789         //
00790         if(!(VA = new sdVertex<WT>*[NumV]))
00791             { cerr << "sdGraph::InputBinary#1\n"; raise(SIGQUIT); }
00792         for(int i=0; i<NumV; ++i)
00793           {
00794             if(!(VA[i] = new sdVertex<WT>))
00795               { cerr << "sdGraph::InputBinary#2\n"; raise(SIGQUIT); }
00796             VA[i]->ID = i;
00797             VA[i]->NumO = 0;
00798             VA[i]->NumI = 0;
00799             VA[i]->OutE = 0;
00800             VA[i]->InE = 0;
00801           }
00802 
00803         for(int i=0; i<NumV; ++i)
00804           {
00805             // Read in number of out-edges:
00806             //
00807             is >= VA[i]->NumO;
00808 
00809             // Read in number of in-edges:
00810             //
00811             is >= VA[i]->NumI;
00812 
00813             if(VA[i]->NumO>0 && 
00814                !(VA[i]->OutE = new sdEdge<WT>[VA[i]->NumO]))
00815                 { cerr << "sdGraph::InputBinary#3\n"; raise(SIGQUIT); }
00816 
00817             if(VA[i]->NumI>0 && 
00818                !(VA[i]->InE = new sdEdge<WT>[VA[i]->NumI]))
00819                 { cerr << "sdGraph::InputBinary#4\n"; raise(SIGQUIT); }
00820 
00821             // Read in out-edges:
00822             //
00823             if(VA[i]->NumO>0)
00824               {
00825                 for(int j=0; j<VA[i]->NumO; ++j)
00826                   {
00827                     // Read in the id and point to the correct vertex:
00828                     //
00829                     is >= vid;
00830 
00831                     if(vid < 0 || vid>=NumV) 
00832                       { cerr << "sdGraph::InputBinary#5\n"; raise(SIGQUIT); }
00833                     
00834                     VA[i]->OutE[j].V = VA[vid];
00835 
00836                     // Read in the weight of the edge:
00837                     //
00838                     is >= VA[i]->OutE[j].W;
00839                   }
00840               }
00841 
00842             // Read in in-edges:
00843             //
00844             if(VA[i]->NumI>0)
00845               {
00846                 for(int j=0; j<VA[i]->NumI; ++j)
00847                   {
00848                     // Read in the id and point to the correct vertex:
00849                     //
00850                     is >= vid;
00851 
00852                     if(vid < 0 || vid>=NumV) 
00853                       { cerr << "sdGraph::InputBinary#6\n"; raise(SIGQUIT); }
00854 
00855                     VA[i]->InE[j].V = VA[vid];
00856 
00857                     // Read in the weight of the edge:
00858                     //
00859                     is >= VA[i]->InE[j].W;
00860                   }
00861               }
00862 
00863           }
00864       }
00865 
00866     // Read in "Data":
00867     //
00868     if(NumV>0)
00869       {
00870         if(!(Data = new DT[NumV]))
00871             { cerr << "sdGraph::InputBinary#7\n"; raise(SIGQUIT); }
00872         for(int i=0; i<NumV; ++i)
00873             is >= Data[i];
00874       }
00875 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!NumEdges@{NumEdges}}
\index{NumEdges@{NumEdges}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Num\-Edges () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a5}




Definition at line 346 of file sdgraph.inc.\footnotesize\begin{verbatim}00347   { return NumE; }
00348 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!NumSCC@{NumSCC}}
\index{NumSCC@{NumSCC}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Num\-SCC () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a46}




Definition at line 357 of file sdgalg.inc.\footnotesize\begin{verbatim}00358   { return SCC().Number(); }
00359 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!NumVertices@{NumVertices}}
\index{NumVertices@{NumVertices}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Num\-Vertices () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a4}




Definition at line 342 of file sdgraph.inc.

Referenced by Constraint\-Manager::Number().\footnotesize\begin{verbatim}00343   { return NumV; }
00344 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!OutDegree@{OutDegree}}
\index{OutDegree@{OutDegree}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ int sd\-Graph$<$DT, WT$>$::Out\-Degree (const {\bf sd\-Vertex}$<$ WT $>$ $\ast$ {\em vert}) const\hspace{0.3cm}{\tt  [private]}}\label{class_sdGraph_c3}


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




Definition at line 376 of file sdgraph.inc.\footnotesize\begin{verbatim}00377   { 
00378     if(!ValidVertex(i)) 
00379       { cerr << "sdGraph::OutDegree\n"; raise(SIGQUIT); }
00380 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Output@{Output}}
\index{Output@{Output}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Output (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a29}




Definition at line 604 of file sdgraph.inc.\footnotesize\begin{verbatim}00605   {
00606     // Print the data, ID, and the number of outgoing/incoming edges
00607     // for each vertex.
00608     //
00609     os << V_BEGIN_DELIM << '\n';
00610     for(int v=0; v<NumV; ++v)
00611         os << '\t' << v << '\t' << Data[v] << '\n';
00612     os << V_END_DELIM << '\n';
00613 
00614     // Print the edges of the vertices
00615     //
00616     os << E_BEGIN_DELIM << '\n';
00617     for(int v=0; v<NumV; ++v)
00618       {
00619         if(VA[v]) VA[v]->PrintOutEdges(os);
00620       }
00621 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!OutputBinary@{OutputBinary}}
\index{OutputBinary@{OutputBinary}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Output\-Binary (ostream \& {\em os}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a36}




Definition at line 884 of file sdgraph.inc.\footnotesize\begin{verbatim}00885   {
00886     // Write "NumV":
00887     //
00888     os <= NumV;
00889 
00890     // Write "NumE":
00891     //
00892     os <= NumE;
00893 
00894     // Write "VA":
00895     //
00896     if(VA && NumV>0)
00897       {
00898         for(int i=0; i<NumV; ++i)
00899           {
00900             // Write the number of out edges.
00901             //
00902             os <= VA[i]->NumO;
00903 
00904             // Write the number of in edges.
00905             //
00906             os <= VA[i]->NumI;
00907 
00908             // Write the out edges (id then weight).
00909             //
00910             if(VA[i]->OutE && VA[i]->NumO > 0)
00911               {
00912                 for(int j=0; j<VA[i]->NumO; ++j)
00913                   {
00914                     os <= VA[i]->OutE[j].V->ID;
00915                     os <= VA[i]->OutE[j].W;
00916                   }
00917               }
00918               
00919             // Write the in edges (id then weight).
00920             //
00921             if(VA[i]->InE && VA[i]->NumI > 0)
00922               {
00923                 for(int j=0; j<VA[i]->NumI; ++j)
00924                   {
00925                     os <= VA[i]->InE[j].V->ID;
00926                     os <= VA[i]->InE[j].W;
00927                   }
00928               }
00929           }
00930       }
00931 
00932     // Write "Data":
00933     //
00934     if(Data && NumV>0)
00935       {
00936         for(int i=0; i<NumV; ++i)
00937             os <= Data[i];
00938       }
00939 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!PrintDotty@{PrintDotty}}
\index{PrintDotty@{PrintDotty}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ ostream \& sd\-Graph$<$ DT, WT $>$::Print\-Dotty (ostream \& {\em os}, int {\em edges} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a31}




Definition at line 626 of file sdgraph.inc.

Referenced by Constraint\-Manager::Print\-Graph().\footnotesize\begin{verbatim}00627   {
00628     int to;
00629     WT w;
00630 
00631     os << "digraph G {\n";
00632     os << "\tcenter = true;\n";
00633     os << "\tratio = compress;\n";
00634     os << "\tsize =\"7.5,10\";\n";
00635     // Define all the labels for the vertices:
00636     for(int i=0; i<NumV; ++i)
00637       {
00638         // GRAPE customization
00639         os << '\t' << i+1 << " [label = \"" << Data[i]->Label()  << "\"];\n";
00640         //      os << '\t' << i+1 << " [label = \"" << Data[i]   << "\"];\n";
00641       }
00642     
00643     // Print all the edges:
00644     for(int i=0; i<NumV; ++i)
00645       {
00646         for(int j=0; j<VA[i]->NumO; ++j)
00647           {
00648             to = VA[i]->OutE[j].V->ID;
00649             w  = VA[i]->OutE[j].W;
00650             os << '\t' << i+1 << " -> " << to+1;
00651             if(edges)
00652                 os << " [label=\"" << w << "\"]";
00653             os << ";\n";
00654           }
00655       }
00656     os << "}
00657 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!Relax@{Relax}}
\index{Relax@{Relax}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ void sd\-Graph$<$ DT, WT $>$::Relax (int {\em u}, int {\em v}, {\bf j\-Vector} \& {\em D}, int $\ast$ {\em P}, int {\em rev}, int {\em wc}) const\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c8}




Definition at line 18 of file sdgalg.inc.\footnotesize\begin{verbatim}00022   {
00023     WT w = (wc==0) ? WT(1.0) : (
00024                (wc>0)  ? (!rev ? GetWeight(u,v,0) : GetWeight(v,u,0)) :
00025                          (!rev ? GetWeight(u,v,1) : GetWeight(v,u,1))
00026                                );
00027     if(D[v] > D[u] + ((double)w))
00028       {
00029         D[v] = D[u] + ((double)w);
00030         if(P) P[v] = u;
00031       }
00032 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!SCC@{SCC}}
\index{SCC@{SCC}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf SDG\_\-Set\-Set\-Int} sd\-Graph$<$ DT, WT $>$::SCC () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a43}




Definition at line 126 of file sdgalg.inc.

Referenced by Num\-SCC(), SCCGraph(), and Strongly\-Connected\-Components().\footnotesize\begin{verbatim}00127   {
00128     SDG_SetSetInt scc;
00129     SDG_SetInt component;
00130     int u, * finish=0, * invfin = 0;
00131 
00132     if(NumV<1) 
00133         return scc;
00134 
00135     if(!(finish = new int[NumV]))
00136         raise(SIGQUIT);
00137     if(!(invfin = new int[NumV]))
00138         raise(SIGQUIT);
00139 
00140     DFTimeStamps(0,finish,0);
00141     
00142     for(u=0; u<NumV; ++u)
00143         invfin[ finish[u] ] = u;
00144       
00145     // Color all the vertices white to mark them as unvisited:
00146     //
00147     sdg_color color[NumV];
00148     for(u=0; u<NumV; ++u)
00149         color[u] = sdg_white;
00150     
00151     for(int i=NumV-1; i>=0; --i)
00152       {
00153         u = invfin[i];
00154         if(color[u] == sdg_white)
00155           {
00156             DF_Visit(u, color, 0, 0, 0, &component, 1);
00157             // scc.Add(component.UniqueCopy());
00158             scc.insert(component);
00159             component.clear();
00160           }
00161       }
00162 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!SCCGraph@{SCCGraph}}
\index{SCCGraph@{SCCGraph}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ sd\-Graph$<$ DT, WT $>$ sd\-Graph$<$ DT, WT $>$::SCCGraph () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a45}




Definition at line 172 of file sdgalg.inc.\footnotesize\begin{verbatim}00173   {
00174     sdGraph<DT,WT> sccgraph;
00175     SDG_SetSetInt sccset = SCC();
00176     SDG_SetSetInt::const_iterator it1;
00177     SDG_SetInt::const_iterator    it2;
00178     int * v2c = 0;              // Mapping from vertex id to component number.
00179     int * numoe = 0;            // Number of outbound edges for each component.
00180     int * numie = 0;            // Number of inbound edges for each component.
00181     int ** OutEdge=0;           // Adjacency matrix for outbound edges.
00182     int ** InEdge=0;            // Adjacency matrix for inbound edges.
00183     int u,v,e;                  // Vertex id's and edge iterator.
00184     int c=0;                    // Increments through components.
00185 
00186     // cerr << "NumV = " << NumV << '\n';
00187     // cerr << "NumC = " << sccset.Number() << '\n';
00188     // cerr << "NumC = " << sccset.size() << '\n';
00189     // raise(SIGQUIT);
00190 
00191     if(NumV < 1)
00192         return sccgraph;
00193 
00194     // if(sccset.Number() == 1)
00195     if(sccset.size() == 1)
00196       {
00197         sccgraph.NumV = 1;
00198         if(!(sccgraph.VA = new sdVertex<WT>*[1]) ||
00199            !(sccgraph.VA[0] = new sdVertex<WT>))
00200             raise(SIGQUIT);
00201         if(!(sccgraph.Data = new DT[1]))
00202             raise(SIGQUIT);
00203         sccgraph.VA[0]->ID = 0;
00204         sccgraph.Data[0] = Data[0];
00205         return sccgraph;
00206       }
00207 
00208     // sccgraph.NumV = sccset.Number(); // Number of strongly conn. components.
00209     sccgraph.NumV = sccset.size();      // Number of strongly conn. components.
00210 
00211     // Allocate space.
00212     if(!(v2c = new int[NumV]))
00213         raise(SIGQUIT);
00214     if(!(numoe = new int[sccgraph.NumV]))
00215         raise (SIGQUIT);
00216     if(!(numie = new int[sccgraph.NumV]))
00217         raise (SIGQUIT);
00218     if(!(sccgraph.VA = new sdVertex<WT>*[sccgraph.NumV]))
00219         raise(SIGQUIT);
00220     if(!(sccgraph.Data = new DT[sccgraph.NumV]))
00221         raise(SIGQUIT);
00222     if(!(OutEdge = new int*[sccgraph.NumV]))
00223         raise(SIGQUIT);
00224     if(!(InEdge = new int*[sccgraph.NumV]))
00225         raise(SIGQUIT);
00226 
00227     // Initialize the adjacency matrices.
00228     for(u=0; u<sccgraph.NumV; ++u)
00229       {
00230         if(!(OutEdge[u] = new int[sccgraph.NumV]))
00231             raise(SIGQUIT);
00232         if(!(InEdge[u] = new int[sccgraph.NumV]))
00233             raise(SIGQUIT);
00234 
00235         for(v=0; v<sccgraph.NumV; ++v)
00236           {
00237             OutEdge[u][v] = 0;
00238             InEdge[u][v]  = 0;
00239           }
00240         numoe[u] = 0;
00241         numie[u] = 0;
00242       }
00243 
00244     // Initialize the mapping from vertices to components.
00245     for(u=0; u<NumV; ++u)
00246         v2c[u] = -1;
00247 
00248     // Introduce vertices into the SCC-Graph.
00249     c=0;
00250     int got;
00251     for(it1 = sccset.begin(); it1!=sccset.end(); ++it1)
00252       {
00253         if(!(sccgraph.VA[c] = new sdVertex<WT>))
00254             raise(SIGQUIT);
00255         sccgraph.VA[c]->ID = c;
00256 
00257         // Record the vertices that belong to this component.
00258         got = 0;
00259         for(it2 = ($\ast$it1).begin(); it2!=($\ast$it1).end(); ++it2)
00260           {
00261             v2c[*it2] = c;
00262 
00263             // Copy one of the vertices' data into the component graph.
00264             if(!got)
00265               {
00266                 sccgraph.Data[c] = Data[*it2];
00267                 got = 1;
00268               }
00269           }
00270         ++c;
00271       }
00272 
00273     // Make sure the mapping from vertices to components is complete:
00274     //
00275     for(u=0; u<NumV; ++u)
00276         if(v2c[u] == -1)
00277             raise(SIGQUIT);
00278 
00279     // Create the adjacency matrices.
00280     for(u=0; u<NumV; ++u)
00281       {
00282         // Find out which component this vertex belongs to.
00283         c = v2c[u];
00284 
00285         // Record the outbound component edges in the adjacency matrix.
00286         for(e=0; e<VA[u]->NumO; ++e)
00287           {
00288             v = VA[u]->OutE[e].V->ID;
00289             if((v2c[v] != c) && !OutEdge[c][v2c[v]])
00290               {
00291                 OutEdge[c][v2c[v]] = 1;
00292                 ++numoe[c];
00293               }
00294           }
00295 
00296         // Record the inbound component edges in the adjacency matrix.
00297         for(e=0; e<VA[u]->NumI; ++e)
00298           {
00299             v = VA[u]->InE[e].V->ID;
00300             if((v2c[v] != c) && !InEdge[c][v2c[v]])
00301               {
00302                 InEdge[c][v2c[v]] = 1;
00303                 ++numie[c];
00304               }
00305           }
00306       }
00307 
00308     // Make the edges in the component graph.
00309     for(u=0; u<sccgraph.NumV; ++u)
00310       {
00311         sccgraph.VA[u]->NumO = numoe[u];
00312         sccgraph.VA[u]->NumI = numie[u];
00313 
00314         // Create space for the edges.
00315         if((numoe[u]>0) && !(sccgraph.VA[u]->OutE = new sdEdge<WT>[numoe[u]]))
00316             raise(SIGQUIT);
00317         if((numie[u]>0) && !(sccgraph.VA[u]->InE = new sdEdge<WT>[numie[u]]))
00318             raise(SIGQUIT);
00319         
00320         // Read which edges to introduce from the adjacency matrix.
00321         c = 0;
00322         for(v=0; v<sccgraph.NumV; ++v)
00323           {
00324             if(OutEdge[u][v])
00325               {
00326                 sccgraph.VA[u]->OutE[c].V = sccgraph.VA[v];
00327                 sccgraph.VA[u]->OutE[c].W = 1.0;
00328                 ++c;
00329               }
00330           }
00331         c = 0;
00332         for(v=0; v<sccgraph.NumV; ++v)
00333           {
00334             if(InEdge[u][v])
00335               {
00336                 sccgraph.VA[u]->InE[c].V = sccgraph.VA[v];
00337                 sccgraph.VA[u]->InE[c].W = 1.0;
00338                 ++c;
00339               }
00340           }
00341       }
00342 
00343     delete[] v2c;
00344     delete[] numoe;
00345     delete[] numie;
00346     for(u=0; u<sccgraph.NumV; ++u)
00347       {
00348         delete[] OutEdge[u];
00349         delete[] InEdge[u];
00350       }
00351 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!StronglyConnectedComponents@{StronglyConnectedComponents}}
\index{StronglyConnectedComponents@{StronglyConnectedComponents}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf SDG\_\-Set\-Set\-Int} sd\-Graph$<$ DT, WT $>$::Strongly\-Connected\-Components () const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a44}




Definition at line 168 of file sdgalg.inc.\footnotesize\begin{verbatim}00169   { return SCC(); }
00170 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!SubGraph@{SubGraph}}
\index{SubGraph@{SubGraph}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ sd\-Graph$<$ DT, WT $>$ sd\-Graph$<$ DT, WT $>$::Sub\-Graph (const {\bf SDG\_\-Set\-Int} \& {\em vertset}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a28}




Definition at line 476 of file sdgraph.inc.\footnotesize\begin{verbatim}00477   {
00478     sdGraph<DT,WT> sub;
00479     int * subid=0;              // Maps id's from this graph to the subgraph.
00480     int * vertex=0;             // Array of verts (copied from vertset).
00481     int u,v,e,i,nbr,numv;
00482     // SDG_SetInt::ConstIterator it;
00483     SDG_SetInt::const_iterator it;
00484 
00485     if(NumV<1) return sub;
00486 
00487     // Filter out any bad vertex indices from the set:
00488     numv=0;
00489     // for(it = vertset.GetConstIterator(); it; ++it)
00490     for(it = vertset.begin(); it!=vertset.end(); ++it)
00491         if(($\ast$it)>=0 && ($\ast$it)<NumV)
00492             ++numv;
00493 
00494     if(numv<1) return sub;
00495     
00496     // Make space for the vertices and the data.
00497     if(!(sub.VA = new sdVertex<WT>*[numv]))
00498       { cerr << "sdGraph::SubGraph#1\n"; raise(SIGQUIT); }
00499     if(!(sub.Data = new DT[numv]))
00500       { cerr << "sdGraph::SubGraph#2\n"; raise(SIGQUIT); }
00501 
00502     sub.NumV = numv;
00503 
00504     // Copy the vertices into a static array.
00505     if(!(vertex = new int[sub.NumV]))
00506       { cerr << "sdGraph::SubGraph#3\n"; raise(SIGQUIT); }
00507     u=0;
00508     // for(it.Reset(); it; ++it)
00509     for(it = vertset.begin(); it!=vertset.end(); ++it)
00510       {
00511         v = *it;
00512         if(v>=0 && v<NumV)
00513             vertex[u++] = v;
00514       }
00515 
00516     // Sort these vertices to make sure in increasing order.
00517     QuickSort(vertex,sub.NumV);
00518 
00519     if(!(subid = new int[NumV]))
00520       { cerr << "sdGraph::SubGraph#4\n"; raise(SIGQUIT); }
00521 
00522     for(v=0; v<NumV; ++v)       // Mark the id's as not existing in subgraph
00523         subid[v] = -1;
00524 
00525     // Determine the vertices from this graph to be included in the subgraph.
00526     for(u=0; u<sub.NumV; ++u)
00527       {
00528         v = vertex[u];
00529         if(!(sub.VA[u] = new sdVertex<WT>))
00530           { cerr << "sdGraph::SubGraph#5\n"; raise(SIGQUIT); }
00531         sub.VA[u]->ID = u;
00532         subid[v] = u;
00533 
00534         // Copy the data in.
00535         sub.Data[u] = Data[v];
00536       }
00537 
00538     // Introduce the edges into the subgraph.
00539     for(u=0; u<sub.NumV; ++u)
00540       {
00541         v = vertex[u];
00542 
00543         // Determine the number of outbound edges for vertex u.
00544         sub.VA[u]->NumO = 0;
00545         for(e=0; e<VA[v]->NumO; ++e)
00546           {
00547             nbr = subid[ VA[v]->OutE[e].V->ID ];
00548             if(nbr != -1)
00549                 ++(sub.VA[u]->NumO);
00550           }
00551 
00552         // Determine the number of inbound edges for vertex u.
00553         sub.VA[u]->NumI = 0;
00554         for(e=0; e<VA[v]->NumI; ++e)
00555           {
00556             nbr = subid[ VA[v]->InE[e].V->ID ];
00557             if(nbr != -1)
00558                 ++(sub.VA[u]->NumI);
00559           }
00560 
00561         // Allocate space for the edges.
00562         if(sub.VA[u]->NumO>0 && 
00563           !(sub.VA[u]->OutE = new sdEdge<WT>[sub.VA[u]->NumO]))
00564             { cerr << "sdGraph::SubGraph#6\n"; raise(SIGQUIT); }
00565         if(sub.VA[u]->NumI>0 && 
00566           !(sub.VA[u]->InE = new sdEdge<WT>[sub.VA[u]->NumI]))
00567             { cerr << "sdGraph::SubGraph#7\n"; raise(SIGQUIT); }
00568         
00569         // Copy the outbound edges.
00570         i=0;
00571         for(e=0; e<VA[v]->NumO; ++e)
00572           {
00573             nbr = subid[ VA[v]->OutE[e].V->ID ];
00574             if(nbr != -1)
00575               {
00576                 sub.VA[u]->OutE[i].V = sub.VA[nbr];
00577                 sub.VA[u]->OutE[i].W = VA[v]->OutE[e].W;
00578                 ++i;
00579                 ++(sub.NumE);
00580               }
00581           }
00582 
00583         // Copy the inbound edges.
00584         i=0;
00585         for(e=0; e<VA[v]->NumI; ++e)
00586           {
00587             nbr = subid[ VA[v]->InE[e].V->ID ];
00588             if(nbr != -1)
00589               {
00590                 sub.VA[u]->InE[i].V = sub.VA[nbr];
00591                 sub.VA[u]->InE[i].W = VA[v]->InE[e].W;
00592                 ++i;
00593               }
00594           }
00595         cerr << "]\n";
00596       }
00597 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!TravLists@{TravLists}}
\index{TravLists@{TravLists}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf SDG\_\-Int\-List} $\ast$$\ast$ sd\-Graph$<$ DT, WT $>$::Trav\-Lists (int {\em src}, int {\em k}, {\bf KAdj\-Mat} $\ast$ {\em P} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a34}




Definition at line 706 of file sdgraph.inc.

Referenced by begin\_\-path().\footnotesize\begin{verbatim}00707   {
00708     if(NumV<1 || k<1 || src<0 || src>=NumV) return 0;
00709 
00710     DLList<int> ** T;   // The traversal lists, originating at the source.
00711     int alloc = 0;      // Keeps track if we allocate space for P.
00712 
00713     if(!(T = new DLList<int>*[k-1])) return 0;
00714     for(int i=0; i<k; ++i)
00715       {
00716         if(!(T[i] = new DLList<int>[NumV]))
00717           {
00718             for(int j=0; j<i; ++j)
00719                 delete[] T[j];
00720             delete[] T;
00721             return 0;
00722           }
00723       }
00724 
00725     if(!P)
00726       // Have to compute the the path matrices (0...k-1):
00727       {
00728         if(!(P = new KAdjMat[k])) 
00729           { delete[] T; return 0; }
00730         P[0] = AdjMatrix();
00731 
00732         for(int i=1; i<k; ++i) P[i] = P[i-1]*P[0];
00733         alloc = 1;
00734       }
00735     
00736     ABS a;
00737     for(int i=0; i<k-1; ++i)
00738       {
00739         for(int j=0; j<NumV; ++j)
00740           {
00741             a = P[i][src]&P[0](j);
00742             for(int l=0; l<NumV; ++l)
00743               {
00744                 if(a.IsSet((uint) l))
00745                     T[i][j].AddToBack(l);
00746               }
00747           }
00748       }
00749 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!TravMatrices@{TravMatrices}}
\index{TravMatrices@{TravMatrices}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf KAdj\-Mat} $\ast$ sd\-Graph$<$ DT, WT $>$::Trav\-Matrices (int {\em src}, int {\em k}, {\bf KAdj\-Mat} $\ast$ {\em P} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a33}




Definition at line 675 of file sdgraph.inc.\footnotesize\begin{verbatim}00676   {
00677     if(NumV<1 || k<1 || src<0 || src>=NumV) return 0;
00678 
00679     KAdjMat * T;        // The traversal matrices, originating at the source.
00680     int alloc = 0;      // Keeps track if we allocate space for P.
00681 
00682     KAdjMat::DefaultSize(NumV);
00683     if(!(T = new KAdjMat[k-1])) return 0;
00684     if(!P)
00685       // Have to compute the the path matrices (0...k-1):
00686       {
00687         if(!(P = new KAdjMat[k])) 
00688           { delete[] T; return 0; }
00689         P[0] = AdjMatrix();
00690 
00691         for(int i=1; i<k; ++i) P[i] = P[i-1]*P[0];
00692         alloc = 1;
00693       }
00694 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!ValidData@{ValidData}}
\index{ValidData@{ValidData}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Valid\-Data (int {\em i}) const\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c2}




Definition at line 372 of file sdgraph.inc.

Referenced by Get\-Data().\footnotesize\begin{verbatim}00373   { return (Data && i>=0 && i<NumV); }
00374 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!ValidVertex@{ValidVertex}}
\index{ValidVertex@{ValidVertex}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ int sd\-Graph$<$ DT, WT $>$::Valid\-Vertex (int {\em i}) const\hspace{0.3cm}{\tt  [inline, private]}}\label{class_sdGraph_c1}




Definition at line 368 of file sdgraph.inc.

Referenced by Degree(), Get\-Vertex(), Get\-Weight(), In\-Degree(), and Out\-Degree().\footnotesize\begin{verbatim}00369   { return (VA && i>=0 && i<NumV && VA[i]); }
00370 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!begin_bf@{begin\_\-bf}}
\index{begin_bf@{begin\_\-bf}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf bf\_\-iterator} sd\-Graph$<$DT, WT$>$::begin\_\-bf (int {\em vndx} = 0, int {\em rev} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a39}




Definition at line 210 of file sdgraph.h.\footnotesize\begin{verbatim}00211     { return bf_iterator(this, vndx, rev); }
00212 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!begin_df@{begin\_\-df}}
\index{begin_df@{begin\_\-df}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf df\_\-iterator} sd\-Graph$<$DT, WT$>$::begin\_\-df (int {\em vndx} = 0, int {\em rev} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a38}




Definition at line 208 of file sdgraph.h.\footnotesize\begin{verbatim}00209     { return df_iterator(this, vndx, rev); }
00210 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!begin_neighbor@{begin\_\-neighbor}}
\index{begin_neighbor@{begin\_\-neighbor}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf neighbor\_\-iterator} sd\-Graph$<$DT, WT$>$::begin\_\-neighbor (int {\em vndx} = 0, int {\em rev} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a37}




Definition at line 206 of file sdgraph.h.

Referenced by Constraint\-Manager::get\-Parents().\footnotesize\begin{verbatim}00207     { return neighbor_iterator(this, vndx, rev); }
00208 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!begin_path@{begin\_\-path}}
\index{begin_path@{begin\_\-path}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf path\_\-iterator} sd\-Graph$<$DT, WT$>$::begin\_\-path (int {\em src}, int {\em tgt}, int {\em len}, {\bf DLList}$<$ int $>$ $\ast$const $\ast$ {\em tl} = 0, int($\ast$ {\em filter})(const sd\-Graph$<$ DT, WT $>$ \&graph,					const int $\ast$path,					int ndx, int pathlen,					void $\ast$arbitrary\_\-criteria) = 0, void $\ast$ {\em criteria} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a40}




Definition at line 212 of file sdgraph.h.\footnotesize\begin{verbatim}00219     {
00220       if(tl)
00221       return path_iterator((const sdGraph<DT,WT>*) this, 
00222                            src, tgt,
00223                            len, tl, filter, criteria);
00224       path_iterator pi;
00225 
00226       //
00227       DLList<int> * const * trav = TravLists(src,len);
00228       pi   = path_iterator((const sdGraph<DT,WT>*) this, src, tgt, 
00229                            len, trav, filter, criteria);
00230 
00231       for(int i=0; i<len-1; ++i) delete[] trav[i];
00232       delete[] trav;
00233       //
00234       return pi;
00235 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator()@{operator()}}
\index{operator()@{operator()}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ WT \& sd\-Graph$<$ DT, WT $>$::operator() (int {\em i}, int {\em j}, int {\em alt} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a27}




Definition at line 472 of file sdgraph.inc.\footnotesize\begin{verbatim}00473   { return GetWeight(i,j,alt); }
00474 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator()@{operator()}}
\index{operator()@{operator()}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const WT \& sd\-Graph$<$ DT, WT $>$::operator() (int {\em i}, int {\em j}, int {\em alt} = 0) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a26}




Definition at line 468 of file sdgraph.inc.\footnotesize\begin{verbatim}00469   { return GetWeight(i,j,alt); }
00470 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator()@{operator()}}
\index{operator()@{operator()}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ DT \& sd\-Graph$<$ DT, WT $>$::operator() (int {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a23}




Definition at line 444 of file sdgraph.inc.\footnotesize\begin{verbatim}00445   { return GetData(i); }
00446 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator()@{operator()}}
\index{operator()@{operator()}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const DT \& sd\-Graph$<$ DT, WT $>$::operator() (int {\em i}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a22}




Definition at line 440 of file sdgraph.inc.\footnotesize\begin{verbatim}00441   { return GetData(i); }
00442 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator=@{operator=}}
\index{operator=@{operator=}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const sd\-Graph$<$ DT, WT $>$ \& sd\-Graph$<$ DT, WT $>$::operator= (const {\bf dd\-Graph}$<$ DT, WT $>$ \& {\em ddg})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a9}




Definition at line 304 of file sdgraph.inc.\footnotesize\begin{verbatim}00305   { Copy(ddg, true); return *this; }
00306 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator=@{operator=}}
\index{operator=@{operator=}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const sd\-Graph$<$ DT, WT $>$ \& sd\-Graph$<$ DT, WT $>$::operator= (const sd\-Graph$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a8}




Definition at line 300 of file sdgraph.inc.\footnotesize\begin{verbatim}00301   { Copy(sdg); return *this; }
00302 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator[]@{operator[]}}
\index{operator[]@{operator[]}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ {\bf sd\-Vertex}$<$ WT $>$ \& sd\-Graph$<$ DT, WT $>$::operator[$\,$] (int {\em i})\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a19}




Definition at line 420 of file sdgraph.inc.\footnotesize\begin{verbatim}00421   { return GetVertex(i); }
00422 \end{verbatim}\normalsize 
\index{sdGraph@{sd\-Graph}!operator[]@{operator[]}}
\index{operator[]@{operator[]}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT$>$ const {\bf sd\-Vertex}$<$ WT $>$ \& sd\-Graph$<$ DT, WT $>$::operator[$\,$] (int {\em i}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_sdGraph_a18}




Definition at line 416 of file sdgraph.inc.\footnotesize\begin{verbatim}00417   { return GetVertex(i); }
00418 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{sdGraph@{sd\-Graph}!ddGraph< DT, WT >@{ddGraph$<$ DT, WT $>$}}
\index{ddGraph< DT, WT >@{ddGraph$<$ DT, WT $>$}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ class {\bf dd\-Graph}\hspace{0.3cm}{\tt  [friend]}}\label{class_sdGraph_l0}




Definition at line 75 of file sdgraph.h.\index{sdGraph@{sd\-Graph}!operator@{operator}}
\index{operator@{operator}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ ostream\& operator (ostream \& {\em os}, const sd\-Graph$<$ DT, WT $>$ \& {\em sdg})\hspace{0.3cm}{\tt  [friend]}}\label{class_sdGraph_l2}


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




Definition at line 944 of file sdgraph.inc.\footnotesize\begin{verbatim}00945   { sdg.InputBinary(is); return is; }
00946 \end{verbatim}\normalsize 


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




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




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




Definition at line 289 of file sdgraph.h.\index{sdGraph@{sd\-Graph}!VA@{VA}}
\index{VA@{VA}!sdGraph@{sd\-Graph}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class DT, class WT = double$>$ {\bf sd\-Vertex}$<$ WT $>$ $\ast$$\ast$ sd\-Graph$<$DT, WT$>$::VA\hspace{0.3cm}{\tt  [private]}}\label{class_sdGraph_o2}




Definition at line 293 of file sdgraph.h.

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