lemon/path.h
changeset 1909 2d806130e700
parent 1875 98698b69a902
child 1956 a055123339d5
     1.1 --- a/lemon/path.h	Thu Jan 26 06:44:22 2006 +0000
     1.2 +++ b/lemon/path.h	Thu Jan 26 15:42:13 2006 +0000
     1.3 @@ -385,7 +385,7 @@
     1.4    //! \todo Thoroughfully check all the range and consistency tests.
     1.5    /// \todo May we need just path for undirected graph instead of this.
     1.6    template<typename Graph>
     1.7 -  class UndirPath {
     1.8 +  class UPath {
     1.9    public:
    1.10      /// Edge type of the underlying graph.
    1.11      typedef typename Graph::Edge GraphEdge;
    1.12 @@ -403,13 +403,13 @@
    1.13  
    1.14      /// \param _G The graph in which the path is.
    1.15      ///
    1.16 -    UndirPath(const Graph &_G) : gr(&_G) {}
    1.17 +    UPath(const Graph &_G) : gr(&_G) {}
    1.18  
    1.19      /// \brief Subpath constructor.
    1.20      ///
    1.21      /// Subpath defined by two nodes.
    1.22      /// \warning It is an error if the two edges are not in order!
    1.23 -    UndirPath(const UndirPath &P, const NodeIt &a, const NodeIt &b) {
    1.24 +    UPath(const UPath &P, const NodeIt &a, const NodeIt &b) {
    1.25        gr = P.gr;
    1.26        edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
    1.27      }
    1.28 @@ -418,7 +418,7 @@
    1.29      ///
    1.30      /// Subpath defined by two edges. Contains edges in [a,b)
    1.31      /// \warning It is an error if the two edges are not in order!
    1.32 -    UndirPath(const UndirPath &P, const EdgeIt &a, const EdgeIt &b) {
    1.33 +    UPath(const UPath &P, const EdgeIt &a, const EdgeIt &b) {
    1.34        gr = P.gr;
    1.35        edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
    1.36      }
    1.37 @@ -500,17 +500,17 @@
    1.38       * Yes, it shouldn't.
    1.39       */
    1.40      class EdgeIt {
    1.41 -      friend class UndirPath;
    1.42 +      friend class UPath;
    1.43  
    1.44        int idx;
    1.45 -      const UndirPath *p;
    1.46 +      const UPath *p;
    1.47      public:
    1.48        /// Default constructor
    1.49        EdgeIt() {}
    1.50        /// Invalid constructor
    1.51        EdgeIt(Invalid) : idx(-1), p(0) {}
    1.52        /// Constructor with starting point
    1.53 -      EdgeIt(const UndirPath &_p, int _idx = 0) :
    1.54 +      EdgeIt(const UPath &_p, int _idx = 0) :
    1.55  	idx(_idx), p(&_p) { validate(); }
    1.56  
    1.57        ///Validity check
    1.58 @@ -547,17 +547,17 @@
    1.59       * Yes, it shouldn't.
    1.60       */
    1.61      class NodeIt {
    1.62 -      friend class UndirPath;
    1.63 +      friend class UPath;
    1.64  
    1.65        int idx;
    1.66 -      const UndirPath *p;
    1.67 +      const UPath *p;
    1.68      public:
    1.69        /// Default constructor
    1.70        NodeIt() {}
    1.71        /// Invalid constructor
    1.72        NodeIt(Invalid) : idx(-1), p(0) {}
    1.73        /// Constructor with starting point
    1.74 -      NodeIt(const UndirPath &_p, int _idx = 0) :
    1.75 +      NodeIt(const UPath &_p, int _idx = 0) :
    1.76  	idx(_idx), p(&_p) { validate(); }
    1.77  
    1.78        ///Validity check
    1.79 @@ -600,17 +600,17 @@
    1.80       * PathConcept) while the builder is active (after the first modifying
    1.81       * operation and until the commit()) the original Path is in a
    1.82       * "transitional" state (operations ot it have undefined result). But
    1.83 -     * in the case of UndirPath the original path is unchanged until the
    1.84 +     * in the case of UPath the original path is unchanged until the
    1.85       * commit. However we don't recomend that you use this feature.
    1.86       */
    1.87      class Builder {
    1.88 -      UndirPath &P;
    1.89 +      UPath &P;
    1.90        Container front, back;
    1.91  
    1.92      public:
    1.93        ///\param _p the path you want to fill in.
    1.94        ///
    1.95 -      Builder(UndirPath &_p) : P(_p) {}
    1.96 +      Builder(UPath &_p) : P(_p) {}
    1.97  
    1.98        /// Sets the starting node of the path.
    1.99