lemon/concepts/path.h
changeset 638 57e6f560fb13
parent 529 f5bc148f7e1f
child 785 9ae88e7c04a7
child 953 b873350e6258
equal deleted inserted replaced
10:41cb096f3f79 11:62f45f90425f
    36     /// \brief A skeleton structure for representing directed paths in
    36     /// \brief A skeleton structure for representing directed paths in
    37     /// a digraph.
    37     /// a digraph.
    38     ///
    38     ///
    39     /// A skeleton structure for representing directed paths in a
    39     /// A skeleton structure for representing directed paths in a
    40     /// digraph.
    40     /// digraph.
    41     /// \tparam _Digraph The digraph type in which the path is.
    41     /// \tparam GR The digraph type in which the path is.
    42     ///
    42     ///
    43     /// In a sense, the path can be treated as a list of arcs. The
    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
    44     /// lemon path type stores just this list. As a consequence it
    45     /// cannot enumerate the nodes in the path and the zero length
    45     /// cannot enumerate the nodes in the path and the zero length
    46     /// paths cannot store the source.
    46     /// paths cannot store the source.
    47     ///
    47     ///
    48     template <typename _Digraph>
    48     template <typename GR>
    49     class Path {
    49     class Path {
    50     public:
    50     public:
    51 
    51 
    52       /// Type of the underlying digraph.
    52       /// Type of the underlying digraph.
    53       typedef _Digraph Digraph;
    53       typedef GR Digraph;
    54       /// Arc type of the underlying digraph.
    54       /// Arc type of the underlying digraph.
    55       typedef typename Digraph::Arc Arc;
    55       typedef typename Digraph::Arc Arc;
    56 
    56 
    57       class ArcIt;
    57       class ArcIt;
    58 
    58 
   203     /// If we would like to give back a real path from these
   203     /// If we would like to give back a real path from these
   204     /// algorithms then we should create a temporarly path object. In
   204     /// algorithms then we should create a temporarly path object. In
   205     /// LEMON such algorithms gives back a path dumper what can
   205     /// LEMON such algorithms gives back a path dumper what can
   206     /// assigned to a real path and the dumpers can be implemented as
   206     /// assigned to a real path and the dumpers can be implemented as
   207     /// an adaptor class to the predecessor map.
   207     /// an adaptor class to the predecessor map.
   208 
   208     ///
   209     /// \tparam _Digraph  The digraph type in which the path is.
   209     /// \tparam GR The digraph type in which the path is.
   210     ///
   210     ///
   211     /// The paths can be constructed from any path type by a
   211     /// The paths can be constructed from any path type by a
   212     /// template constructor or a template assignment operator.
   212     /// template constructor or a template assignment operator.
   213     ///
   213     template <typename GR>
   214     template <typename _Digraph>
       
   215     class PathDumper {
   214     class PathDumper {
   216     public:
   215     public:
   217 
   216 
   218       /// Type of the underlying digraph.
   217       /// Type of the underlying digraph.
   219       typedef _Digraph Digraph;
   218       typedef GR Digraph;
   220       /// Arc type of the underlying digraph.
   219       /// Arc type of the underlying digraph.
   221       typedef typename Digraph::Arc Arc;
   220       typedef typename Digraph::Arc Arc;
   222 
   221 
   223       /// Length of the path ie. the number of arcs in the path.
   222       /// Length of the path ie. the number of arcs in the path.
   224       int length() const { return 0;}
   223       int length() const { return 0;}