Changeset 2357:5365600a7a5c in lemon-0.x for lemon/bits
- Timestamp:
- 02/11/07 17:34:51 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3160
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/path_dump.h
r2335 r2357 1 1 2 /* -*- C++ -*- 2 3 * … … 50 51 } 51 52 52 class Rev It {53 class RevEdgeIt { 53 54 public: 54 Rev It() {}55 Rev It(Invalid) : path(0), current(INVALID) {}56 Rev It(const PredMapPath& _path)55 RevEdgeIt() {} 56 RevEdgeIt(Invalid) : path(0), current(INVALID) {} 57 RevEdgeIt(const PredMapPath& _path) 57 58 : path(&_path), current(_path.target) {} 58 59 … … 61 62 } 62 63 63 Rev It& operator++() {64 RevEdgeIt& operator++() { 64 65 current = path->graph.source(path->predMap[current]); 65 66 if (path->predMap[current] == INVALID) current = INVALID; … … 67 68 } 68 69 69 bool operator==(const Rev It& e) const {70 bool operator==(const RevEdgeIt& e) const { 70 71 return current == e.current; 71 72 } 72 73 73 bool operator!=(const Rev It& e) const {74 bool operator!=(const RevEdgeIt& e) const { 74 75 return current != e.current; 75 76 } 76 77 77 bool operator<(const Rev It& e) const {78 bool operator<(const RevEdgeIt& e) const { 78 79 return current < e.current; 79 80 } … … 122 123 } 123 124 124 class Rev It {125 class RevEdgeIt { 125 126 public: 126 Rev It() {}127 Rev It(Invalid) : path(0), current(INVALID) {}128 Rev It(const PredMatrixMapPath& _path)127 RevEdgeIt() {} 128 RevEdgeIt(Invalid) : path(0), current(INVALID) {} 129 RevEdgeIt(const PredMatrixMapPath& _path) 129 130 : path(&_path), current(_path.target) {} 130 131 … … 133 134 } 134 135 135 Rev It& operator++() {136 RevEdgeIt& operator++() { 136 137 current = 137 138 path->graph.source(path->predMatrixMap(path->source, current)); … … 141 142 } 142 143 143 bool operator==(const Rev It& e) const {144 bool operator==(const RevEdgeIt& e) const { 144 145 return current == e.current; 145 146 } 146 147 147 bool operator!=(const Rev It& e) const {148 bool operator!=(const RevEdgeIt& e) const { 148 149 return current != e.current; 149 150 } 150 151 151 bool operator<(const Rev It& e) const {152 bool operator<(const RevEdgeIt& e) const { 152 153 return current < e.current; 153 154 }
Note: See TracChangeset
for help on using the changeset viewer.