Changeset 1201:1f4f01870c1e in lemonmain
 Timestamp:
 02/17/18 23:44:15 (2 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/path.h
r1130 r1201 44 44 /// \tparam GR The digraph type in which the path is. 45 45 /// 46 /// In a sense, thepath can be treated as a list of arcs. The47 /// LEMON path type s tores justthis list. As a consequence, it48 /// cannot enumerate the nodes of the pathand the source node of49 /// a zero 46 /// In a sense, a path can be treated as a list of arcs. The 47 /// LEMON path type simply stores this list. As a consequence, it 48 /// cannot enumerate the nodes in the path, and the source node of 49 /// a zerolength path is undefined. 50 50 /// 51 51 /// This implementation is a back and front insertable and erasable … … 169 169 /// \brief The nth arc. 170 170 /// 171 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 171 /// Gives back the nth arc. This function runs in O(1) time. 172 /// \pre \c n is in the range <tt>[0..length()  1]</tt>. 172 173 const Arc& nth(int n) const { 173 174 return n < int(head.size()) ? *(head.rbegin() + n) : … … 262 263 /// \tparam GR The digraph type in which the path is. 263 264 /// 264 /// In a sense, thepath can be treated as a list of arcs. The265 /// LEMON path type s tores just this list. As a consequenceit266 /// cannot enumerate the nodes in the path and the zero length paths267 /// cannot store the source.265 /// In a sense, a path can be treated as a list of arcs. The 266 /// LEMON path type simply stores this list. As a consequence, it 267 /// cannot enumerate the nodes in the path, and the source node of 268 /// a zerolength path is undefined. 268 269 /// 269 270 /// This implementation is a just back insertable and erasable path 270 271 /// type. It can be indexed in O(1) time. The back insertion and 271 272 /// erasure is amortized O(1) time. This implementation is faster 272 /// th en the \c Path type because it use just one vector for the273 /// than the \c Path type because it use just one vector for the 273 274 /// arcs. 274 275 template <typename GR> … … 391 392 /// \brief The nth arc. 392 393 /// 393 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 394 /// Gives back the nth arc. This function runs in O(1) time. 395 /// \pre \c n is in the range <tt>[0..length()  1]</tt>. 394 396 const Arc& nth(int n) const { 395 397 return data[n]; … … 456 458 /// \tparam GR The digraph type in which the path is. 457 459 /// 458 /// In a sense, thepath can be treated as a list of arcs. The459 /// LEMON path type s tores just this list. As a consequenceit460 /// cannot enumerate the nodes in the path and the zero length paths461 /// cannot store the source.460 /// In a sense, a path can be treated as a list of arcs. The 461 /// LEMON path type simply stores this list. As a consequence, it 462 /// cannot enumerate the nodes in the path, and the source node of 463 /// a zerolength path is undefined. 462 464 /// 463 465 /// This implementation is a back and front insertable and erasable … … 599 601 /// 600 602 /// This function looks for the nth arc in O(n) time. 601 /// \pre \c n is in the <tt>[0..length()  1]</tt> range.603 /// \pre \c n is in the range <tt>[0..length()  1]</tt>. 602 604 const Arc& nth(int n) const { 603 605 Node *node = first; … … 785 787 /// \c it will put into \c tpath. If \c tpath have arcs 786 788 /// before the operation they are removed first. The time 787 /// complexity of this function is O(1) plus the t he time of emtying789 /// complexity of this function is O(1) plus the time of emtying 788 790 /// \c tpath. If \c it is \c INVALID then it just clears \c tpath 789 791 void split(ArcIt it, ListPath& tpath) { … … 826 828 /// \tparam GR The digraph type in which the path is. 827 829 /// 828 /// In a sense, thepath can be treated as a list of arcs. The829 /// LEMON path type s tores just this list. As a consequenceit830 /// cannot enumerate the nodes in the path and the source node of831 /// a zero 830 /// In a sense, a path can be treated as a list of arcs. The 831 /// LEMON path type simply stores this list. As a consequence, it 832 /// cannot enumerate the nodes in the path, and the source node of 833 /// a zerolength path is undefined. 832 834 /// 833 835 /// This implementation is completly static, i.e. it can be copy constucted … … 835 837 /// modified. 836 838 /// 837 /// Being the the most memory efficient path type in LEMON, 838 /// it is intented to be 839 /// used when you want to store a large number of paths. 839 /// Being the most memoryefficient path type in LEMON, it is 840 /// intented to be used when you want to store a large number of paths. 840 841 template <typename GR> 841 842 class StaticPath { … … 955 956 /// \brief The nth arc. 956 957 /// 957 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 958 /// Gives back the nth arc. This function runs in O(1) time. 959 /// \pre \c n is in the range <tt>[0..length()  1]</tt>. 958 960 const Arc& nth(int n) const { 959 961 return _arcs[n]; … … 971 973 int empty() const { return len == 0; } 972 974 973 /// \brief Erase all arcs in the digraph.975 /// \brief Reset the path to an empty one. 974 976 void clear() { 975 977 len = 0; … … 1161 1163 } 1162 1164 1163 /// \brief Class which helps to iterate through the nodes of a path 1164 /// 1165 /// In a sense, the path can be treated as a list of arcs. The 1166 /// LEMON path type stores only this list. As a consequence, it 1167 /// cannot enumerate the nodes in the path and the zero length paths 1168 /// cannot have a source node. 1169 /// 1170 /// This class implements the node iterator of a path structure. To 1171 /// provide this feature, the underlying digraph should be passed to 1165 /// \brief Class for iterating through the nodes of a path 1166 /// 1167 /// Class for iterating through the nodes of a path. 1168 /// 1169 /// In a sense, a path can be treated as a list of arcs. The 1170 /// LEMON path type simply stores this list. As a consequence, it 1171 /// cannot enumerate the nodes in the path, and the source node of 1172 /// a zerolength path is undefined. 1173 /// 1174 /// However, this class implements a node iterator for path structures. 1175 /// To provide this feature, the underlying digraph should be passed to 1172 1176 /// the constructor of the iterator. 1173 1177 template <typename Path>
Note: See TracChangeset
for help on using the changeset viewer.