COIN-OR::LEMON - Graph Library

Changeset 785:9ae88e7c04a7 in lemon-main


Ignore:
Timestamp:
11/13/09 17:30:26 (15 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Doc improvements for Path and PathDumper? concepts (#331)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/path.h

    r559 r785  
    1919///\ingroup concept
    2020///\file
    21 ///\brief Classes for representing paths in digraphs.
     21///\brief The concept of paths
    2222///
    2323
     
    3939    /// A skeleton structure for representing directed paths in a
    4040    /// 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 cannot
     43    /// enumerate the nodes on the path directly and a zero length path
     44    /// 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 source
     48    /// node of the next arc. This consistency could be checked using
     49    /// \ref checkPath().
     50    /// The source and target nodes of a (consistent) path can be obtained
     51    /// using \ref pathSource() and \ref pathTarget().
     52    ///
     53    /// A path can be constructed from another path of any type using the
     54    /// copy constructor or the assignment operator.
     55    ///
    4156    /// \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     ///
    4857    template <typename GR>
    4958    class Path {
     
    6069      Path() {}
    6170
    62       /// \brief Template constructor
     71      /// \brief Template copy constructor
    6372      template <typename CPath>
    6473      Path(const CPath& cpath) {}
    6574
    66       /// \brief Template assigment
     75      /// \brief Template assigment operator
    6776      template <typename CPath>
    6877      Path& operator=(const CPath& cpath) {
     
    7180      }
    7281
    73       /// Length of the path ie. the number of arcs in the path.
     82      /// Length of the path, i.e. the number of arcs on the path.
    7483      int length() const { return 0;}
    7584
     
    8089      void clear() {}
    8190
    82       /// \brief LEMON style iterator for path arcs
     91      /// \brief LEMON style iterator for enumerating the arcs of a path.
    8392      ///
    84       /// This class is used to iterate on the arcs of the paths.
     93      /// LEMON style iterator class for enumerating the arcs of a path.
    8594      class ArcIt {
    8695      public:
     
    8998        /// Invalid constructor
    9099        ArcIt(Invalid) {}
    91         /// Constructor for first arc
     100        /// Sets the iterator to the first arc of the given path
    92101        ArcIt(const Path &) {}
    93102
    94         /// Conversion to Arc
     103        /// Conversion to \c Arc
    95104        operator Arc() const { return INVALID; }
    96105
     
    193202    ///
    194203    /// A skeleton structure for path dumpers. The path dumpers are
    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.
     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.
    200208    ///
    201209    /// The main purpose of this concept is that the shortest path
    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
     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
    207213    /// an adaptor class to the predecessor map.
    208214    ///
    209215    /// \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.
    213216    template <typename GR>
    214217    class PathDumper {
     
    220223      typedef typename Digraph::Arc Arc;
    221224
    222       /// Length of the path ie. the number of arcs in the path.
     225      /// Length of the path, i.e. the number of arcs on the path.
    223226      int length() const { return 0;}
    224227
     
    228231      /// \brief Forward or reverse dumping
    229232      ///
    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.
     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.
    234236      typedef False RevPathTag;
    235237
    236       /// \brief LEMON style iterator for path arcs
     238      /// \brief LEMON style iterator for enumerating the arcs of a path.
    237239      ///
    238       /// This class is used to iterate on the arcs of the paths.
     240      /// LEMON style iterator class for enumerating the arcs of a path.
    239241      class ArcIt {
    240242      public:
     
    243245        /// Invalid constructor
    244246        ArcIt(Invalid) {}
    245         /// Constructor for first arc
     247        /// Sets the iterator to the first arc of the given path
    246248        ArcIt(const PathDumper&) {}
    247249
    248         /// Conversion to Arc
     250        /// Conversion to \c Arc
    249251        operator Arc() const { return INVALID; }
    250252
     
    261263      };
    262264
    263       /// \brief LEMON style iterator for path arcs
     265      /// \brief LEMON style iterator for enumerating the arcs of a path
     266      /// in reverse direction.
    264267      ///
    265       /// This class is used to iterate on the arcs of the paths in
    266       /// reverse direction.
     268      /// LEMON style iterator class for enumerating the arcs of a path
     269      /// in reverse direction.
    267270      class RevArcIt {
    268271      public:
     
    271274        /// Invalid constructor
    272275        RevArcIt(Invalid) {}
    273         /// Constructor for first arc
     276        /// Sets the iterator to the last arc of the given path
    274277        RevArcIt(const PathDumper &) {}
    275278
    276         /// Conversion to Arc
     279        /// Conversion to \c Arc
    277280        operator Arc() const { return INVALID; }
    278281
Note: See TracChangeset for help on using the changeset viewer.