diff -r 39b6e65574c6 -r 0759d974de81 lemon/concepts/path.h --- a/lemon/concepts/path.h Thu Apr 02 22:34:03 2015 +0200 +++ b/lemon/concepts/path.h Sun Jan 05 22:24:56 2014 +0100 @@ -26,6 +26,7 @@ #include #include +#include namespace lemon { namespace concepts { @@ -115,6 +116,23 @@ }; + /// \brief Gets the collection of the arcs of the path. + /// + /// This function can be used for iterating on the + /// arcs of the path. It returns a wrapped + /// ArcIt, which looks like an STL container + /// (by having begin() and end()) which you can use in range-based + /// for loops, STL algorithms, etc. + /// For example you can write: + ///\code + /// for(auto a: p.arcs()) + /// doSomething(a); + ///\endcode + LemonRangeWrapper1 arcs() const { + return LemonRangeWrapper1(*this); + } + + template struct Constraints { void constraints() { @@ -264,6 +282,23 @@ }; + /// \brief Gets the collection of the arcs of the path. + /// + /// This function can be used for iterating on the + /// arcs of the path. It returns a wrapped + /// ArcIt, which looks like an STL container + /// (by having begin() and end()) which you can use in range-based + /// for loops, STL algorithms, etc. + /// For example you can write: + ///\code + /// for(auto a: p.arcs()) + /// doSomething(a); + ///\endcode + LemonRangeWrapper1 arcs() const { + return LemonRangeWrapper1(*this); + } + + /// \brief LEMON style iterator for enumerating the arcs of a path /// in reverse direction. /// @@ -293,6 +328,24 @@ }; + /// \brief Gets the collection of the arcs of the path + /// in reverse direction. + /// + /// This function can be used for iterating on the + /// arcs of the path in reverse direction. It returns a wrapped + /// RevArcIt, which looks like an STL container + /// (by having begin() and end()) which you can use in range-based + /// for loops, STL algorithms, etc. + /// For example you can write: + ///\code + /// for(auto a: p.revArcs()) + /// doSomething(a); + ///\endcode + LemonRangeWrapper1 revArcs() const { + return LemonRangeWrapper1(*this); + } + + template struct Constraints { void constraints() {