Changeset 916:c0734a8c282c in lemon-0.x for src/hugo/smart_graph.h
- Timestamp:
- 09/28/04 18:40:55 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1227
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/smart_graph.h
r909 r916 395 395 OutEdgeIt() {} 396 396 OutEdgeIt(const SymSmartGraph& g, Edge e) { 397 if ( e.id & 1== 0) {397 if ((e.id & 1) == 0) { 398 398 out = Parent::OutEdgeIt(g, SymEdge(e)); 399 399 in = Parent::InEdgeIt(g, g.tail(e)); … … 432 432 InEdgeIt() {} 433 433 InEdgeIt(const SymSmartGraph& g, Edge e) { 434 if ( e.id & 1== 0) {434 if ((e.id & 1) == 0) { 435 435 out = Parent::OutEdgeIt(g, SymEdge(e)); 436 436 in = Parent::InEdgeIt(g, g.tail(e)); … … 541 541 542 542 Node tail(Edge e) const { 543 return e.id & 1== 0 ?543 return (e.id & 1) == 0 ? 544 544 Parent::tail(SymEdge(e)) : Parent::head(SymEdge(e)); 545 545 } 546 546 547 547 Node head(Edge e) const { 548 return e.id & 1== 0 ?548 return (e.id & 1) == 0 ? 549 549 Parent::head(SymEdge(e)) : Parent::tail(SymEdge(e)); 550 550 } … … 631 631 } 632 632 633 /// Finds an symmetric edge between two nodes.634 635 /// Finds an symmetric edge from node \c u to node \c v.636 ///637 /// If \c prev is \ref INVALID (this is the default value), then638 /// It finds the first edge from \c u to \c v. Otherwise it looks for639 /// the next edge from \c u to \c v after \c prev.640 /// \return The found edge or INVALID if there is no such an edge.633 // /// Finds an symmetric edge between two nodes. 634 635 // /// Finds an symmetric edge from node \c u to node \c v. 636 // /// 637 // /// If \c prev is \ref INVALID (this is the default value), then 638 // /// It finds the first edge from \c u to \c v. Otherwise it looks for 639 // /// the next edge from \c u to \c v after \c prev. 640 // /// \return The found edge or INVALID if there is no such an edge. 641 641 642 642 // SymEdge findEdge(Node u, Node v, SymEdge prev = INVALID) … … 668 668 669 669 static Edge backward(SymEdge e) { 670 return Edge((id(e) << 1) &1);670 return Edge((id(e) << 1) | 1); 671 671 } 672 672
Note: See TracChangeset
for help on using the changeset viewer.