Changeset 1741:7a98fe2ed989 in lemon-0.x for lemon/belmann_ford.h
- Timestamp:
- 10/26/05 12:50:47 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2269
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/belmann_ford.h
r1723 r1741 413 413 int num = countNodes(*graph) - 1; 414 414 for (int i = 0; i < num; ++i) { 415 bool ready= true;415 bool done = true; 416 416 for (EdgeIt it(*graph); it != INVALID; ++it) { 417 417 Node source = graph->source(it); … … 422 422 _pred->set(target, it); 423 423 _dist->set(target, relaxed); 424 ready= false;424 done = false; 425 425 } 426 426 } 427 if ( ready) return;428 } 429 } 430 431 /// \brief Executes the algorithm and check the negative circles.427 if (done) return; 428 } 429 } 430 431 /// \brief Executes the algorithm and checks the negative circles. 432 432 /// 433 433 /// \pre init() must be called and at least one node should be added … … 443 443 int num = countNodes(*graph); 444 444 for (int i = 0; i < num; ++i) { 445 bool ready= true;445 bool done = true; 446 446 for (EdgeIt it(*graph); it != INVALID; ++it) { 447 447 Node source = graph->source(it); … … 452 452 _pred->set(target, it); 453 453 _dist->set(target, relaxed); 454 ready= false;454 done = false; 455 455 } 456 456 } 457 if ( ready) return true;457 if (done) return true; 458 458 } 459 459 return false;
Note: See TracChangeset
for help on using the changeset viewer.