diff -r 2236d00ca778 -r 15282595e6f4 lemon/dfs.h --- a/lemon/dfs.h Thu Nov 01 19:49:51 2018 +0100 +++ b/lemon/dfs.h Sun Aug 17 15:02:03 2008 +0200 @@ -181,7 +181,7 @@ //Indicates if _processed is locally allocated (true) or not. bool local_processed; - std::vector _stack; + std::vector _stack; int _stack_head; //Creates the maps if necessary. @@ -457,7 +457,8 @@ { _reached->set(s,true); _pred->set(s,INVALID); - OutArcIt e(*G,s); + Arc e; + G->firstOut(e,s); if(e!=INVALID) { _stack[++_stack_head]=e; _dist->set(s,_stack_head); @@ -484,19 +485,19 @@ _pred->set(m,e); _reached->set(m,true); ++_stack_head; - _stack[_stack_head] = OutArcIt(*G, m); + G->firstOut(_stack[_stack_head],m); _dist->set(m,_stack_head); } else { m=G->source(e); - ++_stack[_stack_head]; + G->nextOut(_stack[_stack_head]); } while(_stack_head>=0 && _stack[_stack_head]==INVALID) { _processed->set(m,true); --_stack_head; if(_stack_head>=0) { m=G->source(_stack[_stack_head]); - ++_stack[_stack_head]; + G->nextOut(_stack[_stack_head]); } } return e; @@ -510,7 +511,7 @@ ///is empty. OutArcIt nextArc() const { - return _stack_head>=0?_stack[_stack_head]:INVALID; + return OutArcIt(*G,_stack_head>=0?_stack[_stack_head]:INVALID); } ///Returns \c false if there are nodes to be processed.