Changeset 3:272a5677bd6d in lemon0.x for src/include/graph.h
 Timestamp:
 12/13/03 16:44:50 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@15
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/include/graph.h
r2 r3 58 58 59 59 NodeIterator() {;} 60 NodeIterator(Graph<N,E> &Gr)//'const Graph<N,E> &G' would be wrong. 61 {G=&Gr;n=Gr.OldGraph<N,E>::FirstNode();} 60 62 NodeIterator(const NodeIterator &i) {G=i.G;n=i.n;} 61 63 … … 149 151 { 150 152 public: 153 InEdgeIterator() {} 154 InEdgeIterator(const Graph<N,E> &Gr,const NodeIterator &n) 155 { G=&Gr; e=Gr.OldGraph<N,E>::FirstIn(n.n);} 156 151 157 InEdgeIterator &GoNext() { e=e>NextIn(); return *this;} 152 158 InEdgeIterator Next() const {return InEdgeIterator(*this).GoNext();} … … 170 176 { 171 177 public: 178 OutEdgeIterator() {} 179 OutEdgeIterator(Graph<N,E> &Gr,const NodeIterator &n) 180 { G=&Gr; e=Gr.OldGraph<N,E>::FirstOut(n.n);} 181 172 182 OutEdgeIterator &GoNext() { e=e>NextOut(); return *this;} 173 183 OutEdgeIterator Next() const {return OutEdgeIterator(*this).GoNext();} … … 193 203 194 204 public: 205 SymEdgeIterator() {} 206 SymEdgeIterator(const Graph<N,E> &Gr,const NodeIterator &nn) 207 { G=&Gr; n=nn; e=Gr.FirstSym(nn.n); } 208 195 209 SymEdgeIterator &GoNext() { e=e>NextEdge(n.n); return *this;} 196 210 SymEdgeIterator Next() const {return SymEdgeIterator(*this).GoNext();} … … 217 231 218 232 public: 233 AllEdgeIterator() {} 234 AllEdgeIterator(Graph<N,E> &Gr) : n(Gr) 235 { 236 e=n.isValid()?Gr.OldGraph<N,E>::FirstOut(n.n):NULL; 237 } 238 219 239 AllEdgeIterator &GoNext() 220 240 { … … 249 269 typedef SymEdgeIterator DeletingSymEdgeIterator; 250 270 251 const NodeIterator &FirstNode()271 const NodeIterator FirstNode() 252 272 { 253 273 NodeIterator i; … … 285 305 286 306 //Vagy beginnode()? 287 const DeletingEdgeIterator &FirstOut(const NodeIterator &n)307 const DeletingEdgeIterator FirstOut(const NodeIterator &n) 288 308 { 289 309 EdgeIterator i; … … 291 311 return i; 292 312 } 293 const DeletingEdgeIterator &FirstIn(const NodeIterator &n)313 const DeletingEdgeIterator FirstIn(const NodeIterator &n) 294 314 { 295 315 EdgeIterator i; … … 297 317 return i; 298 318 } 299 const DeletingSymEdgeIterator &FirstSym(const NodeIterator &n)319 const DeletingSymEdgeIterator FirstSym(const NodeIterator &n) 300 320 { 301 321 EdgeIterator i; … … 369 389 370 390 int NodeNum() { OldGraph<N,E>::NodeNum(); } 371 intClean() { OldGraph<N,E>::Clean(); }391 void Clean() { OldGraph<N,E>::Clean(); } 372 392 373 393 Graph() : _FST(this) {}
Note: See TracChangeset
for help on using the changeset viewer.