Changeset 1147:a10624ed1997 in lemon
 Timestamp:
 06/22/12 16:42:05 (10 years ago)
 Branch:
 default
 Parents:
 1143:38e1d4383262 (diff), 1144:7440937d154b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.  Phase:
 public
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/path.h
r1024 r1147 65 65 Path() {} 66 66 67 /// \brief Copy constructor 68 /// 69 Path(const Path& cpath) { 70 pathCopy(cpath, *this); 71 } 72 67 73 /// \brief Template copy constructor 68 74 /// … … 72 78 Path(const CPath& cpath) { 73 79 pathCopy(cpath, *this); 80 } 81 82 /// \brief Copy assignment 83 /// 84 Path& operator=(const Path& cpath) { 85 pathCopy(cpath, *this); 86 return *this; 74 87 } 75 88 … … 253 266 SimplePath() {} 254 267 268 /// \brief Copy constructor 269 /// 270 SimplePath(const SimplePath& cpath) { 271 pathCopy(cpath, *this); 272 } 273 255 274 /// \brief Template copy constructor 256 275 /// … … 260 279 SimplePath(const CPath& cpath) { 261 280 pathCopy(cpath, *this); 281 } 282 283 /// \brief Copy assignment 284 /// 285 SimplePath& operator=(const SimplePath& cpath) { 286 pathCopy(cpath, *this); 287 return *this; 262 288 } 263 289 … … 432 458 ListPath() : first(0), last(0) {} 433 459 460 /// \brief Copy constructor 461 /// 462 ListPath(const ListPath& cpath) : first(0), last(0) { 463 pathCopy(cpath, *this); 464 } 465 434 466 /// \brief Template copy constructor 435 467 /// … … 446 478 ~ListPath() { 447 479 clear(); 480 } 481 482 /// \brief Copy assignment 483 /// 484 ListPath& operator=(const ListPath& cpath) { 485 pathCopy(cpath, *this); 486 return *this; 448 487 } 449 488 … … 759 798 StaticPath() : len(0), arcs(0) {} 760 799 800 /// \brief Copy constructor 801 /// 802 StaticPath(const StaticPath& cpath) : arcs(0) { 803 pathCopy(cpath, *this); 804 } 805 761 806 /// \brief Template copy constructor 762 807 /// … … 772 817 ~StaticPath() { 773 818 if (arcs) delete[] arcs; 819 } 820 821 /// \brief Copy assignment 822 /// 823 StaticPath& operator=(const StaticPath& cpath) { 824 pathCopy(cpath, *this); 825 return *this; 774 826 } 775 827 
lemon/path.h
r1144 r1147 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 200320 095 * Copyright (C) 20032010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 44 44 /// 45 45 /// In a sense, the path can be treated as a list of arcs. The 46 /// lemonpath type stores just this list. As a consequence, it46 /// LEMON path type stores just this list. As a consequence, it 47 47 /// cannot enumerate the nodes of the path and the source node of 48 48 /// a zero length path is undefined. … … 149 149 void clear() { head.clear(); tail.clear(); } 150 150 151 /// \brief The n th arc.151 /// \brief The nth arc. 152 152 /// 153 153 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. … … 157 157 } 158 158 159 /// \brief Initialize arc iterator to point to the n th arc159 /// \brief Initialize arc iterator to point to the nth arc 160 160 /// 161 161 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. … … 245 245 /// 246 246 /// In a sense, the path can be treated as a list of arcs. The 247 /// lemonpath type stores just this list. As a consequence it247 /// LEMON path type stores just this list. As a consequence it 248 248 /// cannot enumerate the nodes in the path and the zero length paths 249 249 /// cannot store the source. … … 354 354 void clear() { data.clear(); } 355 355 356 /// \brief The n th arc.356 /// \brief The nth arc. 357 357 /// 358 358 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. … … 361 361 } 362 362 363 /// \brief Initializes arc iterator to point to the n th arc.363 /// \brief Initializes arc iterator to point to the nth arc. 364 364 ArcIt nthIt(int n) const { 365 365 return ArcIt(*this, n); … … 422 422 /// 423 423 /// In a sense, the path can be treated as a list of arcs. The 424 /// lemonpath type stores just this list. As a consequence it424 /// LEMON path type stores just this list. As a consequence it 425 425 /// cannot enumerate the nodes in the path and the zero length paths 426 426 /// cannot store the source. … … 544 544 }; 545 545 546 /// \brief The n th arc.547 /// 548 /// This function looks for the n th arc in O(n) time.546 /// \brief The nth arc. 547 /// 548 /// This function looks for the nth arc in O(n) time. 549 549 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. 550 550 const Arc& nth(int n) const { … … 556 556 } 557 557 558 /// \brief Initializes arc iterator to point to the n th arc.558 /// \brief Initializes arc iterator to point to the nth arc. 559 559 ArcIt nthIt(int n) const { 560 560 Node *node = first; … … 775 775 /// 776 776 /// In a sense, the path can be treated as a list of arcs. The 777 /// lemonpath type stores just this list. As a consequence it777 /// LEMON path type stores just this list. As a consequence it 778 778 /// cannot enumerate the nodes in the path and the source node of 779 779 /// a zero length path is undefined. … … 884 884 }; 885 885 886 /// \brief The n th arc.886 /// \brief The nth arc. 887 887 /// 888 888 /// \pre \c n is in the <tt>[0..length()  1]</tt> range. … … 891 891 } 892 892 893 /// \brief The arc iterator pointing to the n th arc.893 /// \brief The arc iterator pointing to the nth arc. 894 894 ArcIt nthIt(int n) const { 895 895 return ArcIt(*this, n); … … 1019 1019 }; 1020 1020 1021 1021 1022 1022 template <typename From, typename To, 1023 1023 bool revEnable = RevPathTagIndicator<From>::value> … … 1025 1025 static void copy(const From& from, To& to) { 1026 1026 PathCopySelectorForward<From, To>::copy(from, to); 1027 } 1027 } 1028 1028 }; 1029 1029 … … 1032 1032 static void copy(const From& from, To& to) { 1033 1033 PathCopySelectorBackward<From, To>::copy(from, to); 1034 } 1034 } 1035 1035 }; 1036 1036 … … 1095 1095 /// 1096 1096 /// In a sense, the path can be treated as a list of arcs. The 1097 /// lemonpath type stores only this list. As a consequence, it1097 /// LEMON path type stores only this list. As a consequence, it 1098 1098 /// cannot enumerate the nodes in the path and the zero length paths 1099 1099 /// cannot have a source node.
Note: See TracChangeset
for help on using the changeset viewer.