Changeset 1909:2d806130e700 in lemon-0.x for lemon/path.h
- Timestamp:
- 01/26/06 16:42:13 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/path.h
r1875 r1909 386 386 /// \todo May we need just path for undirected graph instead of this. 387 387 template<typename Graph> 388 class U ndirPath {388 class UPath { 389 389 public: 390 390 /// Edge type of the underlying graph. … … 404 404 /// \param _G The graph in which the path is. 405 405 /// 406 U ndirPath(const Graph &_G) : gr(&_G) {}406 UPath(const Graph &_G) : gr(&_G) {} 407 407 408 408 /// \brief Subpath constructor. … … 410 410 /// Subpath defined by two nodes. 411 411 /// \warning It is an error if the two edges are not in order! 412 U ndirPath(const UndirPath &P, const NodeIt &a, const NodeIt &b) {412 UPath(const UPath &P, const NodeIt &a, const NodeIt &b) { 413 413 gr = P.gr; 414 414 edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx); … … 419 419 /// Subpath defined by two edges. Contains edges in [a,b) 420 420 /// \warning It is an error if the two edges are not in order! 421 U ndirPath(const UndirPath &P, const EdgeIt &a, const EdgeIt &b) {421 UPath(const UPath &P, const EdgeIt &a, const EdgeIt &b) { 422 422 gr = P.gr; 423 423 edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx); … … 501 501 */ 502 502 class EdgeIt { 503 friend class U ndirPath;503 friend class UPath; 504 504 505 505 int idx; 506 const U ndirPath *p;506 const UPath *p; 507 507 public: 508 508 /// Default constructor … … 511 511 EdgeIt(Invalid) : idx(-1), p(0) {} 512 512 /// Constructor with starting point 513 EdgeIt(const U ndirPath &_p, int _idx = 0) :513 EdgeIt(const UPath &_p, int _idx = 0) : 514 514 idx(_idx), p(&_p) { validate(); } 515 515 … … 548 548 */ 549 549 class NodeIt { 550 friend class U ndirPath;550 friend class UPath; 551 551 552 552 int idx; 553 const U ndirPath *p;553 const UPath *p; 554 554 public: 555 555 /// Default constructor … … 558 558 NodeIt(Invalid) : idx(-1), p(0) {} 559 559 /// Constructor with starting point 560 NodeIt(const U ndirPath &_p, int _idx = 0) :560 NodeIt(const UPath &_p, int _idx = 0) : 561 561 idx(_idx), p(&_p) { validate(); } 562 562 … … 601 601 * operation and until the commit()) the original Path is in a 602 602 * "transitional" state (operations ot it have undefined result). But 603 * in the case of U ndirPath the original path is unchanged until the603 * in the case of UPath the original path is unchanged until the 604 604 * commit. However we don't recomend that you use this feature. 605 605 */ 606 606 class Builder { 607 U ndirPath &P;607 UPath &P; 608 608 Container front, back; 609 609 … … 611 611 ///\param _p the path you want to fill in. 612 612 /// 613 Builder(U ndirPath &_p) : P(_p) {}613 Builder(UPath &_p) : P(_p) {} 614 614 615 615 /// Sets the starting node of the path.
Note: See TracChangeset
for help on using the changeset viewer.