Changeset 1864:1788205e36af in lemon0.x for lemon/johnson.h
 Timestamp:
 12/19/05 10:43:13 (14 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2436
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/johnson.h
r1784 r1864 26 26 #include <lemon/graph_utils.h> 27 27 #include <lemon/dijkstra.h> 28 #include <lemon/bel mann_ford.h>28 #include <lemon/bellman_ford.h> 29 29 #include <lemon/invalid.h> 30 30 #include <lemon/error.h> … … 101 101 typedef typename _LengthMap::Value Value; 102 102 103 /// \brief Operation traits for bel mannford algorithm.103 /// \brief Operation traits for bellmanford algorithm. 104 104 /// 105 105 /// It defines the infinity type on the given Value type … … 545 545 void start() { 546 546 547 typedef typename Bel mannFord<Graph, LengthMap>::547 typedef typename BellmanFord<Graph, LengthMap>:: 548 548 template DefOperationTraits<OperationTraits>:: 549 549 template DefPredMap<NullMap<Node, Edge> >:: 550 Create Bel mannFordType;550 Create BellmanFordType; 551 551 552 Bel mannFordType belmannford(*graph, *length);552 BellmanFordType bellmanford(*graph, *length); 553 553 554 554 NullMap<Node, Edge> predMap; 555 555 556 bel mannford.predMap(predMap);556 bellmanford.predMap(predMap); 557 557 558 bel mannford.init(OperationTraits::zero());559 bel mannford.start();560 561 shiftedRun(bel mannford.distMap());558 bellmanford.init(OperationTraits::zero()); 559 bellmanford.start(); 560 561 shiftedRun(bellmanford.distMap()); 562 562 } 563 563 … … 572 572 bool checkedStart() { 573 573 574 typedef typename Bel mannFord<Graph, LengthMap>::574 typedef typename BellmanFord<Graph, LengthMap>:: 575 575 template DefOperationTraits<OperationTraits>:: 576 576 template DefPredMap<NullMap<Node, Edge> >:: 577 Create Bel mannFordType;578 579 Bel mannFordType belmannford(*graph, *length);577 Create BellmanFordType; 578 579 BellmanFordType bellmanford(*graph, *length); 580 580 581 581 NullMap<Node, Edge> predMap; 582 582 583 bel mannford.predMap(predMap);583 bellmanford.predMap(predMap); 584 584 585 bel mannford.init(OperationTraits::zero());586 if (!bel mannford.checkedStart()) return false;587 588 shiftedRun(bel mannford.distMap());585 bellmanford.init(OperationTraits::zero()); 586 if (!bellmanford.checkedStart()) return false; 587 588 shiftedRun(bellmanford.distMap()); 589 589 return true; 590 590 }
Note: See TracChangeset
for help on using the changeset viewer.