lemon/dfs.h
changeset 953 08cbd48f51f0
parent 319 5e12d7734036
child 959 17e36e175725
child 907 1937b6455b7d
equal deleted inserted replaced
21:e43c2bec5a78 37: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     ///