COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for lemon/path.h


Ignore:
Timestamp:
01/26/06 16:42:13 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/path.h

    r1875 r1909  
    386386  /// \todo May we need just path for undirected graph instead of this.
    387387  template<typename Graph>
    388   class UndirPath {
     388  class UPath {
    389389  public:
    390390    /// Edge type of the underlying graph.
     
    404404    /// \param _G The graph in which the path is.
    405405    ///
    406     UndirPath(const Graph &_G) : gr(&_G) {}
     406    UPath(const Graph &_G) : gr(&_G) {}
    407407
    408408    /// \brief Subpath constructor.
     
    410410    /// Subpath defined by two nodes.
    411411    /// \warning It is an error if the two edges are not in order!
    412     UndirPath(const UndirPath &P, const NodeIt &a, const NodeIt &b) {
     412    UPath(const UPath &P, const NodeIt &a, const NodeIt &b) {
    413413      gr = P.gr;
    414414      edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
     
    419419    /// Subpath defined by two edges. Contains edges in [a,b)
    420420    /// \warning It is an error if the two edges are not in order!
    421     UndirPath(const UndirPath &P, const EdgeIt &a, const EdgeIt &b) {
     421    UPath(const UPath &P, const EdgeIt &a, const EdgeIt &b) {
    422422      gr = P.gr;
    423423      edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
     
    501501     */
    502502    class EdgeIt {
    503       friend class UndirPath;
     503      friend class UPath;
    504504
    505505      int idx;
    506       const UndirPath *p;
     506      const UPath *p;
    507507    public:
    508508      /// Default constructor
     
    511511      EdgeIt(Invalid) : idx(-1), p(0) {}
    512512      /// Constructor with starting point
    513       EdgeIt(const UndirPath &_p, int _idx = 0) :
     513      EdgeIt(const UPath &_p, int _idx = 0) :
    514514        idx(_idx), p(&_p) { validate(); }
    515515
     
    548548     */
    549549    class NodeIt {
    550       friend class UndirPath;
     550      friend class UPath;
    551551
    552552      int idx;
    553       const UndirPath *p;
     553      const UPath *p;
    554554    public:
    555555      /// Default constructor
     
    558558      NodeIt(Invalid) : idx(-1), p(0) {}
    559559      /// Constructor with starting point
    560       NodeIt(const UndirPath &_p, int _idx = 0) :
     560      NodeIt(const UPath &_p, int _idx = 0) :
    561561        idx(_idx), p(&_p) { validate(); }
    562562
     
    601601     * operation and until the commit()) the original Path is in a
    602602     * "transitional" state (operations ot it have undefined result). But
    603      * in the case of UndirPath the original path is unchanged until the
     603     * in the case of UPath the original path is unchanged until the
    604604     * commit. However we don't recomend that you use this feature.
    605605     */
    606606    class Builder {
    607       UndirPath &P;
     607      UPath &P;
    608608      Container front, back;
    609609
     
    611611      ///\param _p the path you want to fill in.
    612612      ///
    613       Builder(UndirPath &_p) : P(_p) {}
     613      Builder(UPath &_p) : P(_p) {}
    614614
    615615      /// Sets the starting node of the path.
Note: See TracChangeset for help on using the changeset viewer.