Changeset 606:c5fd2d996909 in lemon for lemon/path.h
 Timestamp:
 03/29/09 23:08:20 (13 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/path.h
r564 r606 41 41 /// 42 42 /// A structure for representing directed path in a digraph. 43 /// \tparam _DigraphThe digraph type in which the path is.43 /// \tparam GR The digraph type in which the path is. 44 44 /// 45 45 /// In a sense, the path can be treated as a list of arcs. The … … 53 53 /// implementation uses two vectors for storing the front and back 54 54 /// insertions. 55 template <typename _Digraph>55 template <typename GR> 56 56 class Path { 57 57 public: 58 58 59 typedef _DigraphDigraph;59 typedef GR Digraph; 60 60 typedef typename Digraph::Arc Arc; 61 61 … … 138 138 /// \brief The nth arc. 139 139 /// 140 /// \pre n is in the [0..length()  1] range140 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 141 141 const Arc& nth(int n) const { 142 142 return n < int(head.size()) ? *(head.rbegin() + n) : … … 146 146 /// \brief Initialize arc iterator to point to the nth arc 147 147 /// 148 /// \pre n is in the [0..length()  1] range148 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 149 149 ArcIt nthIt(int n) const { 150 150 return ArcIt(*this, n); … … 229 229 /// 230 230 /// A structure for representing directed path in a digraph. 231 /// \tparam _DigraphThe digraph type in which the path is.231 /// \tparam GR The digraph type in which the path is. 232 232 /// 233 233 /// In a sense, the path can be treated as a list of arcs. The … … 241 241 /// then the \c Path type because it use just one vector for the 242 242 /// arcs. 243 template <typename _Digraph>243 template <typename GR> 244 244 class SimplePath { 245 245 public: 246 246 247 typedef _DigraphDigraph;247 typedef GR Digraph; 248 248 typedef typename Digraph::Arc Arc; 249 249 … … 330 330 /// \brief The nth arc. 331 331 /// 332 /// \pre n is in the [0..length()  1] range332 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 333 333 const Arc& nth(int n) const { 334 334 return data[n]; … … 393 393 /// 394 394 /// A structure for representing directed path in a digraph. 395 /// \tparam _DigraphThe digraph type in which the path is.395 /// \tparam GR The digraph type in which the path is. 396 396 /// 397 397 /// In a sense, the path can be treated as a list of arcs. The … … 405 405 /// time. The front and back insertion and erasure is O(1) time 406 406 /// and it can be splited and spliced in O(1) time. 407 template <typename _Digraph>407 template <typename GR> 408 408 class ListPath { 409 409 public: 410 410 411 typedef _DigraphDigraph;411 typedef GR Digraph; 412 412 typedef typename Digraph::Arc Arc; 413 413 … … 508 508 /// 509 509 /// This function looks for the nth arc in O(n) time. 510 /// \pre n is in the [0..length()  1] range510 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 511 511 const Arc& nth(int n) const { 512 512 Node *node = first; … … 733 733 /// 734 734 /// A structure for representing directed path in a digraph. 735 /// \tparam _DigraphThe digraph type in which the path is.735 /// \tparam GR The digraph type in which the path is. 736 736 /// 737 737 /// In a sense, the path can be treated as a list of arcs. The … … 747 747 /// it is intented to be 748 748 /// used when you want to store a large number of paths. 749 template <typename _Digraph>749 template <typename GR> 750 750 class StaticPath { 751 751 public: 752 752 753 typedef _DigraphDigraph;753 typedef GR Digraph; 754 754 typedef typename Digraph::Arc Arc; 755 755 … … 834 834 /// \brief The nth arc. 835 835 /// 836 /// \pre n is in the [0..length()  1] range836 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 837 837 const Arc& nth(int n) const { 838 838 return arcs[n];
Note: See TracChangeset
for help on using the changeset viewer.