lemon/dfs.h
changeset 932 773dd96ecdd8
parent 877 141f9c0db4a3
parent 906 e24922c56bc2
child 966 c8fce9beb46a
equal deleted inserted replaced
36:04ef2e10783c 38:a678443b7f6c
   563     ///
   563     ///
   564     ///\pre init() must be called and a root node should be
   564     ///\pre init() must be called and a root node should be
   565     ///added with addSource() before using this function.
   565     ///added with addSource() before using this function.
   566     void start(Node t)
   566     void start(Node t)
   567     {
   567     {
   568       while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
   568       while ( !emptyQueue() && !(*_reached)[t] )
   569         processNextArc();
   569         processNextArc();
   570     }
   570     }
   571 
   571 
   572     ///Executes the algorithm until a condition is met.
   572     ///Executes the algorithm until a condition is met.
   573 
   573 
  1510     /// - the distance of \c t from the root in the %DFS tree.
  1510     /// - the distance of \c t from the root in the %DFS tree.
  1511     ///
  1511     ///
  1512     /// \pre init() must be called and a root node should be added
  1512     /// \pre init() must be called and a root node should be added
  1513     /// with addSource() before using this function.
  1513     /// with addSource() before using this function.
  1514     void start(Node t) {
  1514     void start(Node t) {
  1515       while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
  1515       while ( !emptyQueue() && !(*_reached)[t] )
  1516         processNextArc();
  1516         processNextArc();
  1517     }
  1517     }
  1518 
  1518 
  1519     /// \brief Executes the algorithm until a condition is met.
  1519     /// \brief Executes the algorithm until a condition is met.
  1520     ///
  1520     ///