\section{df\_\-iterator  Class Reference}
\label{class_df_iterator}\index{df_iterator@{df\_\-iterator}}
Inheritance diagram for df\_\-iterator\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{class_df_iterator_inherit_graph}
\end{center}
\end{figure}
Collaboration diagram for df\_\-iterator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=192pt]{class_df_iterator_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf df\_\-iterator} (int reverse=0)
\item 
{\bf df\_\-iterator} (const df\_\-iterator \&dfi)
\item 
{\bf $\sim$df\_\-iterator} ()
\item 
const df\_\-iterator\& {\bf operator=} (const df\_\-iterator \&dfi)
\item 
void {\bf reset} ()
\item 
{\bf operator int} () const
\item 
const {\bf base\_\-iterator}\& {\bf operator++} ()
\item 
const {\bf base\_\-iterator}\& {\bf operator--} ()
\item 
int {\bf operator $\ast$} () const
\end{CompactItemize}
\subsection*{Protected Methods}
\begin{CompactItemize}
\item 
{\bf df\_\-iterator} ({\bf sd\-Graph}$<$ DT, WT $>$ $\ast$g, int vndx, int reverse=0)
\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
{\bf ABS}$\ast$ {\bf Visited}
\item 
{\bf Stack}$<$int$>$ {\bf S}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf sd\-Graph$<$ DT, WT $>$}
\end{CompactItemize}


\subsection{Constructor \& Destructor Documentation}
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}df\_\-iterator::df\_\-iterator ({\bf sd\-Graph}$<$ DT, WT $>$ $\ast$ {\em g}, int {\em vndx}, int {\em reverse} = 0)\hspace{0.3cm}{\tt  [inline, protected]}}\label{class_df_iterator_b0}




Definition at line 114 of file sdgiter.inc.\footnotesize\begin{verbatim}00115                            : base_iterator(g,vndx,reverse) 
00116 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}df\_\-iterator::df\_\-iterator (int {\em reverse} = 0)\hspace{0.3cm}{\tt  [inline]}}\label{class_df_iterator_a0}




Definition at line 119 of file sdgiter.inc.\footnotesize\begin{verbatim}00119                                            : base_iterator(reverse)
00120 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\index{df_iterator@{df\_\-iterator}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}df\_\-iterator::df\_\-iterator (const df\_\-iterator \& {\em dfi})\hspace{0.3cm}{\tt  [inline]}}\label{class_df_iterator_a1}




Definition at line 123 of file sdgiter.inc.\footnotesize\begin{verbatim}00123                                                     : base_iterator(dfi) 
00124                   { 
00125                     Visited = new ABS(*(dfi.Visited));  
00126                     S = dfi.S;
00127 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!~df_iterator@{$\sim$df\_\-iterator}}
\index{~df_iterator@{$\sim$df\_\-iterator}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}df\_\-iterator::$\sim$df\_\-iterator ()\hspace{0.3cm}{\tt  [inline]}}\label{class_df_iterator_a2}




Definition at line 129 of file sdgiter.inc.\footnotesize\begin{verbatim}00130                   { delete Visited; }
00131 \end{verbatim}\normalsize 


\subsection{Member Function Documentation}
\index{df_iterator@{df\_\-iterator}!operator *@{operator $\ast$}}
\index{operator *@{operator $\ast$}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int df\_\-iterator::operator $\ast$ () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_df_iterator_a8}




Reimplemented from {\bf base\_\-iterator} {\rm (p.\,\pageref{class_base_iterator_a9})}.

Definition at line 204 of file sdgiter.inc.\footnotesize\begin{verbatim}00204                                        { return vid; }
00205 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!operator int@{operator int}}
\index{operator int@{operator int}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}df\_\-iterator::operator int () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_df_iterator_a5}




Reimplemented from {\bf base\_\-iterator} {\rm (p.\,\pageref{class_base_iterator_a7})}.

Definition at line 156 of file sdgiter.inc.\footnotesize\begin{verbatim}00157                   { return (vid!=-1); }
00158 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!operator++@{operator++}}
\index{operator++@{operator++}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf base\_\-iterator} \& df\_\-iterator::operator++ ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_df_iterator_a6}




Reimplemented from {\bf base\_\-iterator} {\rm (p.\,\pageref{class_base_iterator_a8})}.

Definition at line 159 of file sdgiter.inc.\footnotesize\begin{verbatim}00160                   {
00161                     int visited, nbrid;
00162 
00163                     // We can stop if we've visited all the vertices:
00164                     if(Visited->IsAllSet()) vid = -1;
00165                     if(vid==-1) return *this;
00166 
00167                     const sdEdge<WT>* edges = rev ? G->VA[vid]->InE : 
00168                                                     G->VA[vid]->OutE;
00169                     int n = rev ? G->VA[vid]->NumI : G->VA[vid]->NumO;
00170 
00171                     // Push all the unvisited neighbors onto the stack:
00172                     for(int i=0; i<n; ++i)
00173                       {
00174                         nbrid = edges[i].V->ID;
00175                         if(!Visited->IsSet(nbrid))
00176                             S.Push(nbrid);
00177                       }
00178 
00179                     // Skip all the visited vertices in the stack and 
00180                     // assign 'vid' to the first unvisited vertex:
00181                     vid = -1;
00182                     visited = 1;
00183                     while(!S.IsEmpty() && visited)
00184                       {
00185                         vid = S.Pop();
00186                         if((visited = Visited->IsSet((uint) vid)))
00187                             vid = -1;
00188                       }
00189 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!operator--@{operator--}}
\index{operator--@{operator--}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf base\_\-iterator} \& df\_\-iterator::operator-- ()\hspace{0.3cm}{\tt  [inline]}}\label{class_df_iterator_a7}




Definition at line 196 of file sdgiter.inc.\footnotesize\begin{verbatim}00197                   {
00198                     rev = rev ? 0 : 1;
00199                     ++($\ast$this);
00200                     rev = rev ? 0 : 1;
00201                     return *this;
00202 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!operator=@{operator=}}
\index{operator=@{operator=}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const df\_\-iterator \& df\_\-iterator::operator= (const df\_\-iterator \& {\em dfi})\hspace{0.3cm}{\tt  [inline]}}\label{class_df_iterator_a3}




Definition at line 132 of file sdgiter.inc.\footnotesize\begin{verbatim}00133                   {
00134                     if(this!=&dfi) 
00135                       { 
00136                         G=dfi.G; vstart=dfi.vstart; vid=dfi.vid; rev=dfi.rev; 
00137                         S = dfi.S;
00138                         delete Visited;
00139                         Visited = new ABS(*(dfi.Visited));
00140                       }
00141 \end{verbatim}\normalsize 
\index{df_iterator@{df\_\-iterator}!reset@{reset}}
\index{reset@{reset}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void df\_\-iterator::reset ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_df_iterator_a4}




Reimplemented from {\bf base\_\-iterator} {\rm (p.\,\pageref{class_base_iterator_a6})}.

Definition at line 144 of file sdgiter.inc.\footnotesize\begin{verbatim}00145                   { 
00146                     if(bad()) vid=-1;
00147                     else
00148                       {
00149                         S.Clear(); 
00150                         vid = vstart;
00151                         Visited->ClearAll(); 
00152                         Visited->Set((uint) vid);
00153                       }
00154 \end{verbatim}\normalsize 


\subsection{Friends And Related Function Documentation}
\index{df_iterator@{df\_\-iterator}!sdGraph< DT, WT >@{sdGraph$<$ DT, WT $>$}}
\index{sdGraph< DT, WT >@{sdGraph$<$ DT, WT $>$}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}class {\bf sd\-Graph}\hspace{0.3cm}{\tt  [friend]}}\label{class_df_iterator_l0}




Reimplemented from {\bf base\_\-iterator} {\rm (p.\,\pageref{class_base_iterator_l0})}.

Definition at line 111 of file sdgiter.inc.

\subsection{Member Data Documentation}
\index{df_iterator@{df\_\-iterator}!S@{S}}
\index{S@{S}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Stack}$<$ int $>$ df\_\-iterator::S\hspace{0.3cm}{\tt  [private]}}\label{class_df_iterator_o1}




Definition at line 211 of file sdgiter.inc.\index{df_iterator@{df\_\-iterator}!Visited@{Visited}}
\index{Visited@{Visited}!df_iterator@{df\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf ABS} $\ast$ df\_\-iterator::Visited\hspace{0.3cm}{\tt  [private]}}\label{class_df_iterator_o0}




Definition at line 208 of file sdgiter.inc.

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