Changes in lemon/concepts/path.h [832:9ae88e7c04a7:606:c5fd2d996909] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/path.h
r832 r606 19 19 ///\ingroup concept 20 20 ///\file 21 ///\brief The concept of paths21 ///\brief Classes for representing paths in digraphs. 22 22 /// 23 23 … … 39 39 /// A skeleton structure for representing directed paths in a 40 40 /// digraph. 41 /// In a sense, a path can be treated as a list of arcs.42 /// LEMON path types just store this list. As a consequence, they cannot43 /// enumerate the nodes on the path directly and a zero length path44 /// cannot store its source node.45 ///46 /// The arcs of a path should be stored in the order of their directions,47 /// i.e. the target node of each arc should be the same as the source48 /// node of the next arc. This consistency could be checked using49 /// \ref checkPath().50 /// The source and target nodes of a (consistent) path can be obtained51 /// using \ref pathSource() and \ref pathTarget().52 ///53 /// A path can be constructed from another path of any type using the54 /// copy constructor or the assignment operator.55 ///56 41 /// \tparam GR The digraph type in which the path is. 42 /// 43 /// In a sense, the path can be treated as a list of arcs. The 44 /// lemon path type stores just this list. As a consequence it 45 /// cannot enumerate the nodes in the path and the zero length 46 /// paths cannot store the source. 47 /// 57 48 template <typename GR> 58 49 class Path { … … 69 60 Path() {} 70 61 71 /// \brief Template co py constructor62 /// \brief Template constructor 72 63 template <typename CPath> 73 64 Path(const CPath& cpath) {} 74 65 75 /// \brief Template assigment operator66 /// \brief Template assigment 76 67 template <typename CPath> 77 68 Path& operator=(const CPath& cpath) { … … 80 71 } 81 72 82 /// Length of the path , i.e. the number of arcs on the path.73 /// Length of the path ie. the number of arcs in the path. 83 74 int length() const { return 0;} 84 75 … … 89 80 void clear() {} 90 81 91 /// \brief LEMON style iterator for enumerating the arcs of a path.82 /// \brief LEMON style iterator for path arcs 92 83 /// 93 /// LEMON style iterator class for enumerating the arcs of a path.84 /// This class is used to iterate on the arcs of the paths. 94 85 class ArcIt { 95 86 public: … … 98 89 /// Invalid constructor 99 90 ArcIt(Invalid) {} 100 /// Sets the iterator to the first arc of the given path91 /// Constructor for first arc 101 92 ArcIt(const Path &) {} 102 93 103 /// Conversion to \cArc94 /// Conversion to Arc 104 95 operator Arc() const { return INVALID; } 105 96 … … 202 193 /// 203 194 /// A skeleton structure for path dumpers. The path dumpers are 204 /// the generalization of the paths, they can enumerate the arcs 205 /// of the path either in forward or in backward order. 206 /// These classes are typically not used directly, they are rather 207 /// used to be assigned to a real path type. 195 /// the generalization of the paths. The path dumpers can 196 /// enumerate the arcs of the path wheter in forward or in 197 /// backward order. In most time these classes are not used 198 /// directly rather it used to assign a dumped class to a real 199 /// path type. 208 200 /// 209 201 /// The main purpose of this concept is that the shortest path 210 /// algorithms can enumerate the arcs easily in reverse order. 211 /// In LEMON, such algorithms give back a (reverse) path dumper that 212 /// can be assigned to a real path. The dumpers can be implemented as 202 /// algorithms can enumerate easily the arcs in reverse order. 203 /// If we would like to give back a real path from these 204 /// algorithms then we should create a temporarly path object. In 205 /// LEMON such algorithms gives back a path dumper what can 206 /// assigned to a real path and the dumpers can be implemented as 213 207 /// an adaptor class to the predecessor map. 214 208 /// 215 209 /// \tparam GR The digraph type in which the path is. 210 /// 211 /// The paths can be constructed from any path type by a 212 /// template constructor or a template assignment operator. 216 213 template <typename GR> 217 214 class PathDumper { … … 223 220 typedef typename Digraph::Arc Arc; 224 221 225 /// Length of the path , i.e. the number of arcs on the path.222 /// Length of the path ie. the number of arcs in the path. 226 223 int length() const { return 0;} 227 224 … … 231 228 /// \brief Forward or reverse dumping 232 229 /// 233 /// If this tag is defined to be \c True, then reverse dumping 234 /// is provided in the path dumper. In this case, \c RevArcIt 235 /// iterator should be implemented instead of \c ArcIt iterator. 230 /// If the RevPathTag is defined and true then reverse dumping 231 /// is provided in the path dumper. In this case instead of the 232 /// ArcIt the RevArcIt iterator should be implemented in the 233 /// dumper. 236 234 typedef False RevPathTag; 237 235 238 /// \brief LEMON style iterator for enumerating the arcs of a path.236 /// \brief LEMON style iterator for path arcs 239 237 /// 240 /// LEMON style iterator class for enumerating the arcs of a path.238 /// This class is used to iterate on the arcs of the paths. 241 239 class ArcIt { 242 240 public: … … 245 243 /// Invalid constructor 246 244 ArcIt(Invalid) {} 247 /// Sets the iterator to the first arc of the given path245 /// Constructor for first arc 248 246 ArcIt(const PathDumper&) {} 249 247 250 /// Conversion to \cArc248 /// Conversion to Arc 251 249 operator Arc() const { return INVALID; } 252 250 … … 263 261 }; 264 262 265 /// \brief LEMON style iterator for enumerating the arcs of a path 266 /// in reverse direction. 263 /// \brief LEMON style iterator for path arcs 267 264 /// 268 /// LEMON style iterator class for enumerating the arcs of a path269 /// inreverse direction.265 /// This class is used to iterate on the arcs of the paths in 266 /// reverse direction. 270 267 class RevArcIt { 271 268 public: … … 274 271 /// Invalid constructor 275 272 RevArcIt(Invalid) {} 276 /// Sets the iterator to the last arc of the given path273 /// Constructor for first arc 277 274 RevArcIt(const PathDumper &) {} 278 275 279 /// Conversion to \cArc276 /// Conversion to Arc 280 277 operator Arc() const { return INVALID; } 281 278
Note: See TracChangeset
for help on using the changeset viewer.