Changeset 1768:1e2e0238e7c8 in lemon0.x
 Timestamp:
 11/04/05 16:59:21 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2300
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/smart_graph.h
r1729 r1768 215 215 } 216 216 217 Edge _findEdge(Node u,Node v, Edge prev = INVALID)218 {219 int e = (prev.n==1)? nodes[u.n].first_out : edges[prev.n].next_out;220 while(e!=1 && edges[e].target!=v.n) e = edges[e].next_out;221 prev.n=e;222 return prev;223 }224 225 217 Node _split(Node n, bool connect = true) 226 218 { … … 257 249 class SmartGraph : public ExtendedSmartGraphBase { 258 250 public: 259 /// Finds an edge between two nodes.260 261 /// Finds an edge from node \c u to node \c v.262 ///263 /// If \c prev is \ref INVALID (this is the default value), then264 /// it finds the first edge from \c u to \c v. Otherwise it looks for265 /// the next edge from \c u to \c v after \c prev.266 /// \return The found edge or \ref INVALID if there is no such an edge.267 ///268 /// Thus you can iterate through each edge from \c u to \c v as it follows.269 /// \code270 /// for(Edge e=G.findEdge(u,v);e!=INVALID;e=G.findEdge(u,v,e)) {271 /// ...272 /// }273 /// \endcode274 /// \todo Possibly it should be a global function.275 Edge findEdge(Node u,Node v, Edge prev = INVALID)276 {277 return _findEdge(u,v,prev);278 }279 251 280 252 class SnapShot;
Note: See TracChangeset
for help on using the changeset viewer.