src/lemon/graph_utils.h
changeset 1150 c20bcf71efe3
parent 1053 90f8696360b2
child 1164 80bb73097736
equal deleted inserted replaced
6:d824d81dfcfe 7:28ff43ad470e
   161   typename Graph::Edge findEdge(const Graph &g,
   161   typename Graph::Edge findEdge(const Graph &g,
   162 		typename Graph::Node u, typename Graph::Node v,
   162 		typename Graph::Node u, typename Graph::Node v,
   163 		typename Graph::Edge prev = INVALID) 
   163 		typename Graph::Edge prev = INVALID) 
   164   {
   164   {
   165     typename Graph::OutEdgeIt e(g,prev);
   165     typename Graph::OutEdgeIt e(g,prev);
   166     if(prev==INVALID) g.first(e,u);
   166     //    if(prev==INVALID) g.first(e,u);
       
   167     if(prev==INVALID) e=typename Graph::OutEdgeIt(g,u);
   167     else ++e;
   168     else ++e;
   168     while(e!=INVALID && g.source(e)!=v) ++e;
   169     while(e!=INVALID && g.target(e)!=v) ++e;
   169     return e;
   170     return e;
   170   }
   171   }
   171   
   172   
   172   ///\e
   173   ///\e
   173 
   174