Changeset 2445:aaf5787f4d5d in lemon0.x
 Timestamp:
 06/05/07 12:57:26 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3282
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/euler.h
r2429 r2445 150 150 typedef typename Graph::NodeIt NodeIt; 151 151 typedef typename Graph::Edge Edge; 152 typedef typename Graph::UEdge UEdge; 152 153 typedef typename Graph::EdgeIt EdgeIt; 153 154 typedef typename Graph::OutEdgeIt OutEdgeIt; … … 173 174 while(nedge[start]!=INVALID) { 174 175 euler.push_back(nedge[start]); 176 visited[nedge[start]]=true; 175 177 Node next=g.target(nedge[start]); 176 178 ++nedge[start]; 177 start=next; while(nedge[start]!=INVALID && visited[nedge[start]]) ++nedge[start]; 179 start=next; 180 while(nedge[start]!=INVALID && visited[nedge[start]]) ++nedge[start]; 178 181 } 179 182 } 180 183 181 184 ///Edge Conversion 182 operator Edge() { return euler.empty()?INVALID:euler.front(); } 183 bool operator==(Invalid) { return euler.empty(); } 184 bool operator!=(Invalid) { return !euler.empty(); } 185 operator Edge() const { return euler.empty()?INVALID:euler.front(); } 186 ///Edge Conversion 187 operator UEdge() const { return euler.empty()?INVALID:euler.front(); } 188 ///\e 189 bool operator==(Invalid) const { return euler.empty(); } 190 ///\e 191 bool operator!=(Invalid) const { return !euler.empty(); } 185 192 186 193 ///Next edge of the tour … … 195 202 else { 196 203 euler.insert(next,nedge[s]); 204 visited[nedge[s]]=true; 197 205 Node n=g.target(nedge[s]); 198 206 ++nedge[s];
Note: See TracChangeset
for help on using the changeset viewer.