src/lemon/smart_graph.h
changeset 1099 91a8ee9d088d
parent 1080 568ce2be7fe0
child 1106 0a7d604a9763
equal deleted inserted replaced
16:0a58a4de88d7 17:a8900b69369e
   211     }
   211     }
   212 
   212 
   213     Edge _findEdge(Node u,Node v, Edge prev = INVALID) 
   213     Edge _findEdge(Node u,Node v, Edge prev = INVALID) 
   214     {
   214     {
   215       int e = (prev.n==-1)? nodes[u.n].first_out : edges[prev.n].next_out;
   215       int e = (prev.n==-1)? nodes[u.n].first_out : edges[prev.n].next_out;
   216       while(e!=-1 && edges[e].source!=v.n) e = edges[e].next_out;
   216       while(e!=-1 && edges[e].target!=v.n) e = edges[e].next_out;
   217       prev.n=e;
   217       prev.n=e;
   218       return prev;
   218       return prev;
   219     }
   219     }
   220 
   220 
   221   };
   221   };