lemon/path.h
changeset 2386 81b47fc5c444
parent 2357 5365600a7a5c
child 2391 14a343be7a5a
equal deleted inserted replaced
11:1527d9ba6aa4 12:6cc4a1f321c1
   138 
   138 
   139     /// \brief Gives back the nth edge.
   139     /// \brief Gives back the nth edge.
   140     ///
   140     ///
   141     /// \pre n is in the [0..length() - 1] range
   141     /// \pre n is in the [0..length() - 1] range
   142     const Edge& nth(int n) const {
   142     const Edge& nth(int n) const {
   143       return n < (int)head.size() ? *(head.rbegin() + n) :
   143       return n < int(head.size()) ? *(head.rbegin() + n) :
   144         *(tail.begin() + (n - head.size()));
   144         *(tail.begin() + (n - head.size()));
   145     }
   145     }
   146 
   146 
   147     /// \brief Initializes edge iterator to point to the nth edge
   147     /// \brief Initializes edge iterator to point to the nth edge
   148     ///
   148     ///