Changeset 1193:c3585aec8cb3 in lemon0.x
 Timestamp:
 03/04/05 18:18:25 (19 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1605
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/lemon/dijkstra.h
r1164 r1193 338 338 339 339 struct DefGraphReachedMapTraits : public Traits { 340 typedef typename Graph:: NodeMap<bool> ReachedMap;340 typedef typename Graph::template NodeMap<bool> ReachedMap; 341 341 static ReachedMap *createReachedMap(const Graph &G) 342 342 { … … 540 540 ///Returns \c false if there are nodes to be processed in the priority heap 541 541 /// 542 bool emptyHeap() { return heap.empty(); }542 bool emptyHeap() { return _heap.empty(); } 543 543 ///Returns the number of the nodes to be processed in the priority heap 544 544 545 545 ///Returns the number of the nodes to be processed in the priority heap 546 546 /// 547 int heapSize() { return heap.size(); }547 int heapSize() { return _heap.size(); } 548 548 549 549 ///Executes the algorithm. … … 598 598 void start(const NM &nm) 599 599 { 600 while ( !_heap.empty() && ! mn[_heap.top()] ) processNextNode();600 while ( !_heap.empty() && !nm[_heap.top()] ) processNextNode(); 601 601 if ( !_heap.empty() ) finalizeNodeData(_heap.top()); 602 602 } … … 841 841 void run() 842 842 { 843 if(_source==0) throw UninitializedParameter(); 844 Dijkstra<Graph,LengthMap,TR> Dij(*(Graph*)_g,*(LengthMap*)_length); 845 if(_pred) Dij.predMap(*(PredMap*)_pred); 846 if(_predNode) Dij.predNodeMap(*(PredNodeMap*)_predNode); 847 if(_dist) Dij.distMap(*(DistMap*)_dist); 848 Dij.run(*(Node*)_source); 843 if(Base::_source==0) throw UninitializedParameter(); 844 Dijkstra<Graph,LengthMap,TR> 845 Dij(*(Graph*)Base::_g,*(LengthMap*)Base::_length); 846 if(Base::_pred) Dij.predMap(*(PredMap*)Base::_pred); 847 if(Base::_predNode) Dij.predNodeMap(*(PredNodeMap*)Base::_predNode); 848 if(Base::_dist) Dij.distMap(*(DistMap*)Base::_dist); 849 Dij.run(*(Node*)Base::_source); 849 850 } 850 851 … … 855 856 void run(Node s) 856 857 { 857 _source=(void *)&s;858 Base::_source=(void *)&s; 858 859 run(); 859 860 } … … 875 876 DijkstraWizard<DefPredMapBase<T> > predMap(const T &t) 876 877 { 877 _pred=(void *)&t;878 Base::_pred=(void *)&t; 878 879 return DijkstraWizard<DefPredMapBase<T> >(*this); 879 880 } … … 896 897 DijkstraWizard<DefPredNodeMapBase<T> > predNodeMap(const T &t) 897 898 { 898 _predNode=(void *)&t;899 Base::_predNode=(void *)&t; 899 900 return DijkstraWizard<DefPredNodeMapBase<T> >(*this); 900 901 } … … 916 917 DijkstraWizard<DefDistMapBase<T> > distMap(const T &t) 917 918 { 918 _dist=(void *)&t;919 Base::_dist=(void *)&t; 919 920 return DijkstraWizard<DefDistMapBase<T> >(*this); 920 921 } … … 926 927 DijkstraWizard<TR> &source(Node s) 927 928 { 928 source=(void *)&s;929 Base::_source=(void *)&s; 929 930 return *this; 930 931 }
Note: See TracChangeset
for help on using the changeset viewer.