Changeset 1158:29961fa390a3 in lemon-0.x for src/lemon/iterable_graph_extender.h
- Timestamp:
- 02/20/05 02:02:07 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1559
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/iterable_graph_extender.h
r1030 r1158 111 111 }; 112 112 113 /// Base node of the iterator 114 /// 115 /// Returns the base node (ie. the source in this case) of the iterator 116 /// 117 /// \todo Document in the concept! 118 Node baseNode(const OutEdgeIt &e) const { 119 return source(e); 120 } 121 /// Running node of the iterator 122 /// 123 /// Returns the running node (ie. the target in this case) of the 124 /// iterator 125 /// 126 /// \todo Document in the concept! 127 Node runningNode(const OutEdgeIt &e) const { 128 return target(e); 129 } 130 131 /// Base node of the iterator 132 /// 133 /// Returns the base node (ie. the target in this case) of the iterator 134 /// 135 /// \todo Document in the concept! 136 Node baseNode(const InEdgeIt &e) const { 137 return target(e); 138 } 139 /// Running node of the iterator 140 /// 141 /// Returns the running node (ie. the source in this case) of the 142 /// iterator 143 /// 144 /// \todo Document in the concept! 145 Node runningNode(const InEdgeIt &e) const { 146 return source(e); 147 } 148 113 149 using Parent::first; 114 150 … … 125 161 126 162 }; 163 164 165 166 167 127 168 128 169 template <typename _Base> … … 170 211 IncEdgeIt(Invalid i) : UndirEdge(i), forward(false) { } 171 212 172 explicitIncEdgeIt(const Graph& _graph, const Node &n)213 IncEdgeIt(const Graph& _graph, const Node &n) 173 214 : graph(&_graph) 174 215 { … … 176 217 } 177 218 178 // FIXME: Do we need this type of constructor here? 179 // IncEdgeIt(const Graph& _graph, const Edge& e) : 180 // UndirEdge(e), graph(&_graph), forward(_graph.forward(e)) { } 181 // or 182 // IncEdgeIt(const Graph& _graph, const Node& n, 183 // Const UndirEdge &e) ... ? 219 IncEdgeIt(const Graph& _graph, const UndirEdge &ue, const Node &n) 220 : graph(&_graph), UndirEdge(ue) 221 { 222 forward = (_graph.source(ue) == n); 223 } 184 224 185 225 IncEdgeIt& operator++() { … … 189 229 }; 190 230 191 Node source(const IncEdgeIt &e) const { 231 using Parent::baseNode; 232 using Parent::runningNode; 233 234 /// Base node of the iterator 235 /// 236 /// Returns the base node of the iterator 237 Node baseNode(const IncEdgeIt &e) const { 192 238 return _dirSource(e); 193 239 } 194 195 /// \todo Shouldn't the "source" of an undirected edge be called "aNode" 196 /// or something??? 197 using Parent::source; 198 199 /// Target of the given Edge. 200 Node target(const IncEdgeIt &e) const { 240 /// Running node of the iterator 241 /// 242 /// Returns the running node of the iterator 243 Node runningNode(const IncEdgeIt &e) const { 201 244 return _dirTarget(e); 202 245 } 203 204 /// \todo Shouldn't the "target" of an undirected edge be called "bNode"205 /// or something???206 using Parent::target;207 246 208 247 };
Note: See TracChangeset
for help on using the changeset viewer.