lemon/dfs.h
branch1.0
changeset 425 f2620192ab6d
parent 344 e562b69acbc6
parent 420 e24922c56bc2
child 427 c59bdcc8e33e
equal deleted inserted replaced
22:6d0a8c17b01a 24:9fb5700ae8e6
   556     ///
   556     ///
   557     ///\pre init() must be called and a root node should be
   557     ///\pre init() must be called and a root node should be
   558     ///added with addSource() before using this function.
   558     ///added with addSource() before using this function.
   559     void start(Node t)
   559     void start(Node t)
   560     {
   560     {
   561       while ( !emptyQueue() && G->target(_stack[_stack_head])!=t )
   561       while ( !emptyQueue() && !(*_reached)[t] )
   562         processNextArc();
   562         processNextArc();
   563     }
   563     }
   564 
   564 
   565     ///Executes the algorithm until a condition is met.
   565     ///Executes the algorithm until a condition is met.
   566 
   566 
  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     ///