Changeset 1916:e7d4eb908e87 in lemon0.x
 Timestamp:
 01/27/06 15:32:33 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2491
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/johnson.h
r1875 r1916 484 484 } 485 485 486 protected: 487 486 public: 487 488 ///\name Execution control 489 /// The simplest way to execute the algorithm is to use 490 /// one of the member functions called \c run(...). 491 /// \n 492 /// If you need more control on the execution, 493 /// Finally \ref start() will perform the actual path 494 /// computation. 495 496 ///@{ 497 498 /// \brief Initializes the internal data structures. 499 /// 500 /// Initializes the internal data structures. 501 void init() { 502 create_maps(); 503 } 504 505 /// \brief Executes the algorithm with own potential map. 506 /// 507 /// This method runs the %Johnson algorithm in order to compute 508 /// the shortest path to each node pairs. The potential map 509 /// can be given for this algorithm which usually calculated 510 /// by the BellmanFord algorithm. If the graph does not have 511 /// negative length edge then this start function can be used 512 /// with constMap<Node, int>(0) parameter to omit the running time of 513 /// the BellmanFord. 514 /// The algorithm computes 515 ///  The shortest path tree for each node. 516 ///  The distance between each node pairs. 488 517 template <typename PotentialMap> 489 void shiftedRun(const PotentialMap& potential) { 490 518 void shiftedStart(const PotentialMap& potential) { 491 519 typename Graph::template EdgeMap<Value> shiftlen(*graph); 492 520 for (EdgeIt it(*graph); it != INVALID; ++it) { … … 517 545 } 518 546 519 public:520 521 ///\name Execution control522 /// The simplest way to execute the algorithm is to use523 /// one of the member functions called \c run(...).524 /// \n525 /// If you need more control on the execution,526 /// Finally \ref start() will perform the actual path527 /// computation.528 529 ///@{530 531 /// \brief Initializes the internal data structures.532 ///533 /// Initializes the internal data structures.534 void init() {535 create_maps();536 }537 538 547 /// \brief Executes the algorithm. 539 548 /// … … 559 568 bellmanford.start(); 560 569 561 shifted Run(bellmanford.distMap());570 shiftedStart(bellmanford.distMap()); 562 571 } 563 572 … … 586 595 if (!bellmanford.checkedStart()) return false; 587 596 588 shifted Run(bellmanford.distMap());597 shiftedStart(bellmanford.distMap()); 589 598 return true; 590 599 }
Note: See TracChangeset
for help on using the changeset viewer.