lemon/dfs.h
changeset 763 08cbd48f51f0
parent 319 5e12d7734036
child 738 c85f53572941
equal deleted inserted replaced
21:e43c2bec5a78 29:3f1d31b34bd2
   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 
  1509     /// - the distance of \c t from the root in the %DFS tree.
  1509     /// - the distance of \c t from the root in the %DFS tree.
  1510     ///
  1510     ///
  1511     /// \pre init() must be called and a root node should be added
  1511     /// \pre init() must be called and a root node should be added
  1512     /// with addSource() before using this function.
  1512     /// with addSource() before using this function.
  1513     void start(Node t) {
  1513     void start(Node t) {
  1514       while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t )
  1514       while ( !emptyQueue() && !(*_reached)[t] )
  1515         processNextArc();
  1515         processNextArc();
  1516     }
  1516     }
  1517 
  1517 
  1518     /// \brief Executes the algorithm until a condition is met.
  1518     /// \brief Executes the algorithm until a condition is met.
  1519     ///
  1519     ///