\section{bf\_\-iterator  Class Reference}
\label{class_bf_iterator}\index{bf_iterator@{bf\_\-iterator}}
Inheritance diagram for bf\_\-iterator\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=49pt]{class_bf_iterator_inherit_graph}
\end{center}
\end{figure}
Collaboration diagram for bf\_\-iterator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=192pt]{class_bf_iterator_coll_graph}
\end{center}
\end{figure}
\subsection*{Public Methods}
\begin{CompactItemize}
\item 
{\bf bf\_\-iterator} (int reverse=0)
\item 
{\bf bf\_\-iterator} (const bf\_\-iterator \&bfi)
\item 
{\bf $\sim$bf\_\-iterator} ()
\item 
const bf\_\-iterator\& {\bf operator=} (const bf\_\-iterator \&bfi)
\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 bf\_\-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 Queue}$<$int$>$ {\bf Q}
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf sd\-Graph$<$ DT, WT $>$}
\end{CompactItemize}


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




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




Definition at line 225 of file sdgiter.inc.\footnotesize\begin{verbatim}00225                                            : base_iterator(reverse) 
00226 \end{verbatim}\normalsize 
\index{bf_iterator@{bf\_\-iterator}!bf_iterator@{bf\_\-iterator}}
\index{bf_iterator@{bf\_\-iterator}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bf\_\-iterator::bf\_\-iterator (const bf\_\-iterator \& {\em bfi})\hspace{0.3cm}{\tt  [inline]}}\label{class_bf_iterator_a1}




Definition at line 229 of file sdgiter.inc.\footnotesize\begin{verbatim}00229                                                     : base_iterator(bfi) 
00230                   { 
00231                     Visited = new ABS(*(bfi.Visited));  
00232                     Q = bfi.Q;
00233 \end{verbatim}\normalsize 
\index{bf_iterator@{bf\_\-iterator}!~bf_iterator@{$\sim$bf\_\-iterator}}
\index{~bf_iterator@{$\sim$bf\_\-iterator}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bf\_\-iterator::$\sim$bf\_\-iterator ()\hspace{0.3cm}{\tt  [inline]}}\label{class_bf_iterator_a2}




Definition at line 235 of file sdgiter.inc.\footnotesize\begin{verbatim}00236                   { delete Visited; }
00237 \end{verbatim}\normalsize 


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




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

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




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

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




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

Definition at line 265 of file sdgiter.inc.\footnotesize\begin{verbatim}00266                   {
00267                     int visited, nbrid;
00268 
00269                     // We can stop if we've visited all the vertices:
00270                     if(Visited->IsAllSet()) vid = -1;
00271 
00272                     if(vid==-1) return *this;
00273 
00274                     const sdEdge<WT>* edges = rev ? G->VA[vid]->InE : 
00275                                                     G->VA[vid]->OutE;
00276                     int n = rev ? G->VA[vid]->NumI : G->VA[vid]->NumO;
00277 
00278                     // Tack all the unvisited neighbors onto the queue:
00279                     for(int i=0; i<n; ++i)
00280                       {
00281                         nbrid = edges[i].V->ID;
00282                         if(!Visited->IsSet(nbrid))
00283                             Q.Add(nbrid);
00284                       }
00285 
00286                     // Skip all the visited vertices in the queue and 
00287                     // assign 'vid' to the first unvisited vertex:
00288                     vid = -1;
00289                     visited = 1;
00290                     while(!Q.IsEmpty() && visited)
00291                       {
00292                         vid = Q.Remove();
00293                         if((visited = Visited->IsSet((uint) vid)))
00294                             vid = -1;
00295                       }
00296 \end{verbatim}\normalsize 
\index{bf_iterator@{bf\_\-iterator}!operator--@{operator--}}
\index{operator--@{operator--}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf base\_\-iterator} \& bf\_\-iterator::operator-- ()\hspace{0.3cm}{\tt  [inline]}}\label{class_bf_iterator_a7}




Definition at line 303 of file sdgiter.inc.\footnotesize\begin{verbatim}00304                   {
00305                     rev = rev ? 0 : 1;
00306                     ++($\ast$this);
00307                     rev = rev ? 0 : 1;
00308                     return *this;
00309 \end{verbatim}\normalsize 
\index{bf_iterator@{bf\_\-iterator}!operator=@{operator=}}
\index{operator=@{operator=}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const bf\_\-iterator \& bf\_\-iterator::operator= (const bf\_\-iterator \& {\em bfi})\hspace{0.3cm}{\tt  [inline]}}\label{class_bf_iterator_a3}




Definition at line 238 of file sdgiter.inc.\footnotesize\begin{verbatim}00239                   {
00240                     if(this!=&bfi) 
00241                       { 
00242                         G=bfi.G; vstart=bfi.vstart; vid=bfi.vid; rev=bfi.rev; 
00243                         Q = bfi.Q;
00244                         delete Visited;
00245                         Visited = new ABS(*(bfi.Visited));
00246                       }
00247 \end{verbatim}\normalsize 
\index{bf_iterator@{bf\_\-iterator}!reset@{reset}}
\index{reset@{reset}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void bf\_\-iterator::reset ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{class_bf_iterator_a4}




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

Definition at line 250 of file sdgiter.inc.\footnotesize\begin{verbatim}00251                   { 
00252                     if(bad()) vid=-1;
00253                     else
00254                       {
00255                         Q.Clear(); 
00256                         vid = vstart;
00257                         Visited->ClearAll(); 
00258                         Visited->Set((uint) vid);
00259                       }
00260 \end{verbatim}\normalsize 


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




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

Definition at line 217 of file sdgiter.inc.

\subsection{Member Data Documentation}
\index{bf_iterator@{bf\_\-iterator}!Q@{Q}}
\index{Q@{Q}!bf_iterator@{bf\_\-iterator}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Queue}$<$ int $>$ bf\_\-iterator::Q\hspace{0.3cm}{\tt  [private]}}\label{class_bf_iterator_o1}




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




Definition at line 314 of file sdgiter.inc.

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