Changeset 986:e997802b855c in lemon-0.x for src/lemon/undir_graph_extender.h
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/undir_graph_extender.h
r981 r986 71 71 } 72 72 73 /// Tailof the given Edge.74 Node tail(const Edge &e) const {75 return e.forward ? Parent:: tail(e) : Parent::head(e);73 /// Source of the given Edge. 74 Node source(const Edge &e) const { 75 return e.forward ? Parent::source(e) : Parent::target(e); 76 76 } 77 77 78 /// \todo Shouldn't the " tail" of an undirected edge be called "aNode"78 /// \todo Shouldn't the "source" of an undirected edge be called "aNode" 79 79 /// or something??? 80 using Parent:: tail;80 using Parent::source; 81 81 82 /// Headof the given Edge.83 Node head(const Edge &e) const {84 return e.forward ? Parent:: head(e) : Parent::tail(e);82 /// Target of the given Edge. 83 Node target(const Edge &e) const { 84 return e.forward ? Parent::target(e) : Parent::source(e); 85 85 } 86 86 87 /// \todo Shouldn't the " head" of an undirected edge be called "bNode"87 /// \todo Shouldn't the "target" of an undirected edge be called "bNode" 88 88 /// or something??? 89 using Parent:: head;89 using Parent::target; 90 90 91 91 /// Returns whether the given directed edge is same orientation as the … … 97 97 98 98 Node oppsiteNode(const Node &n, const Edge &e) const { 99 if( n == Parent:: tail(e))100 return Parent:: head(e);101 else if( n == Parent:: head(e))102 return Parent:: tail(e);99 if( n == Parent::source(e)) 100 return Parent::target(e); 101 else if( n == Parent::target(e)) 102 return Parent::source(e); 103 103 else 104 104 return INVALID; … … 148 148 Parent::nextOut(e); 149 149 if( UndirEdge(e) == INVALID ) { 150 Parent::firstIn(e, Parent:: tail(e));150 Parent::firstIn(e, Parent::source(e)); 151 151 e.forward = false; 152 152 } … … 160 160 Parent::nextIn(e); 161 161 if( UndirEdge(e) == INVALID ) { 162 Parent::firstOut(e, Parent:: head(e));162 Parent::firstOut(e, Parent::target(e)); 163 163 e.forward = false; 164 164 }
Note: See TracChangeset
for help on using the changeset viewer.