Changeset 1627:3fd1ba6e9872 in lemon-0.x for lemon/bits/iterable_graph_extender.h
- Timestamp:
- 08/11/05 17:55:17 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2135
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/iterable_graph_extender.h
r1564 r1627 119 119 }; 120 120 121 /// Base node of the iterator121 /// \brief Base node of the iterator 122 122 /// 123 123 /// Returns the base node (ie. the source in this case) of the iterator 124 ///125 /// \todo Document in the concept!126 124 Node baseNode(const OutEdgeIt &e) const { 127 125 return Parent::source((Edge)e); 128 126 } 129 /// Running node of the iterator127 /// \brief Running node of the iterator 130 128 /// 131 129 /// Returns the running node (ie. the target in this case) of the 132 130 /// iterator 133 ///134 /// \todo Document in the concept!135 131 Node runningNode(const OutEdgeIt &e) const { 136 132 return Parent::target((Edge)e); 137 133 } 138 134 139 /// Base node of the iterator135 /// \brief Base node of the iterator 140 136 /// 141 137 /// Returns the base node (ie. the target in this case) of the iterator 142 ///143 /// \todo Document in the concept!144 138 Node baseNode(const InEdgeIt &e) const { 145 139 return Parent::target((Edge)e); 146 140 } 147 /// Running node of the iterator141 /// \brief Running node of the iterator 148 142 /// 149 143 /// Returns the running node (ie. the source in this case) of the 150 144 /// iterator 151 ///152 /// \todo Document in the concept!153 145 Node runningNode(const InEdgeIt &e) const { 154 146 return Parent::source((Edge)e); … … 157 149 using Parent::first; 158 150 151 /// \brief The opposite node on the given edge. 152 /// 153 /// Gives back the opposite on the given edge. 154 Node oppositeNode(const Node& n, const Edge& e) const { 155 if (Parent::source(e) == n) { 156 return Parent::target(e); 157 } else { 158 return Parent::source(e); 159 } 160 } 161 159 162 private: 160 161 // /// \todo When (and if) we change the iterators concept to use operator*,162 // /// then the following shadowed methods will become superfluous.163 // /// But for now these are important safety measures.164 163 165 164 // void first(NodeIt &) const; … … 191 190 typedef IterableUndirGraphExtender<_Base> Graph; 192 191 typedef typename Parent::Node Node; 193 192 typedef typename Parent::Edge Edge; 194 193 typedef typename Parent::UndirEdge UndirEdge; 195 194 … … 262 261 } 263 262 263 /// \brief The opposite node on the given undirected edge. 264 /// 265 /// Gives back the opposite on the given undirected edge. 266 Node oppositeNode(const Node& n, const UndirEdge& e) const { 267 if (Parent::source(e) == n) { 268 return Parent::target(e); 269 } else { 270 return Parent::source(e); 271 } 272 } 273 264 274 }; 265 275 }
Note: See TracChangeset
for help on using the changeset viewer.