Changeset 78:c46b3453455f in lemon for lemon/concepts/graph.h
- Timestamp:
- 02/28/08 17:06:02 (17 years ago)
- Branch:
- default
- Children:
- 84:8161012eaa61, 92:5d4decd1b870
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/graph.h
r61 r78 64 64 /// the EdgeMap to map values for the edges. The InArcIt and 65 65 /// OutArcIt iterates on the same edges but with opposite 66 /// direction. The Inc ArcIt iterates also on the same edges66 /// direction. The IncEdgeIt iterates also on the same edges 67 67 /// as the OutArcIt and InArcIt but it is not convertible to Arc just 68 68 /// to Edge. … … 271 271 ///\code 272 272 /// int count=0; 273 /// for(Graph::Inc ArcIt e(g, n); e!=INVALID; ++e) ++count;273 /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count; 274 274 ///\endcode 275 class Inc ArcIt : public Edge {276 public: 277 /// Default constructor 278 279 /// @warning The default constructor sets the iterator 280 /// to an undefined value. 281 Inc ArcIt() { }282 /// Copy constructor. 283 284 /// Copy constructor. 285 /// 286 Inc ArcIt(const IncArcIt& e) : Edge(e) { }287 /// Initialize the iterator to be invalid. 288 289 /// Initialize the iterator to be invalid. 290 /// 291 Inc ArcIt(Invalid) { }275 class IncEdgeIt : public Edge { 276 public: 277 /// Default constructor 278 279 /// @warning The default constructor sets the iterator 280 /// to an undefined value. 281 IncEdgeIt() { } 282 /// Copy constructor. 283 284 /// Copy constructor. 285 /// 286 IncEdgeIt(const IncEdgeIt& e) : Edge(e) { } 287 /// Initialize the iterator to be invalid. 288 289 /// Initialize the iterator to be invalid. 290 /// 291 IncEdgeIt(Invalid) { } 292 292 /// This constructor sets the iterator to first incident arc. 293 293 294 294 /// This constructor set the iterator to the first incident arc of 295 295 /// the node. 296 Inc ArcIt(const Graph&, const Node&) { }297 /// Edge -> Inc ArcIt conversion296 IncEdgeIt(const Graph&, const Node&) { } 297 /// Edge -> IncEdgeIt conversion 298 298 299 299 /// Sets the iterator to the value of the trivial iterator \c e. 300 300 /// This feature necessitates that each time we 301 301 /// iterate the arc-set, the iteration order is the same. 302 Inc ArcIt(const Graph&, const Edge&) { }302 IncEdgeIt(const Graph&, const Edge&) { } 303 303 /// Next incident arc 304 304 305 305 /// Assign the iterator to the next incident arc 306 306 /// of the corresponding node. 307 Inc ArcIt& operator++() { return *this; }307 IncEdgeIt& operator++() { return *this; } 308 308 }; 309 309 … … 721 721 /// 722 722 /// Returns the base node of the iterator 723 Node baseNode(Inc ArcIt) const {723 Node baseNode(IncEdgeIt) const { 724 724 return INVALID; 725 725 } … … 728 728 /// 729 729 /// Returns the running node of the iterator 730 Node runningNode(Inc ArcIt) const {730 Node runningNode(IncEdgeIt) const { 731 731 return INVALID; 732 732 }
Note: See TracChangeset
for help on using the changeset viewer.