Changes in lemon/dijkstra.h [525:9605e051942f:463:88ed40ad0d4f] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dijkstra.h
r525 r463 74 74 typedef typename LM::Value Value; 75 75 76 /// Operation traits for %Dijkstra algorithm.76 /// Operation traits for Dijkstra algorithm. 77 77 78 78 /// This class defines the operations that are used in the algorithm. … … 85 85 /// Usually it is \c Digraph::NodeMap<int>. 86 86 typedef typename Digraph::template NodeMap<int> HeapCrossRef; 87 ///Instantiates a \ cHeapCrossRef.87 ///Instantiates a \ref HeapCrossRef. 88 88 89 89 ///This function instantiates a \ref HeapCrossRef. … … 95 95 } 96 96 97 ///The heap type used by the %Dijkstra algorithm.97 ///The heap type used by the Dijkstra algorithm. 98 98 99 99 ///The heap type used by the Dijkstra algorithm. … … 102 102 ///\sa Dijkstra 103 103 typedef BinHeap<typename LM::Value, HeapCrossRef, std::less<Value> > Heap; 104 ///Instantiates a \ cHeap.104 ///Instantiates a \ref Heap. 105 105 106 106 ///This function instantiates a \ref Heap. … … 117 117 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 118 118 typedef typename Digraph::template NodeMap<typename Digraph::Arc> PredMap; 119 ///Instantiates a \cPredMap.120 121 ///This function instantiates a \refPredMap.119 ///Instantiates a PredMap. 120 121 ///This function instantiates a PredMap. 122 122 ///\param g is the digraph, to which we would like to define the 123 /// \refPredMap.123 ///PredMap. 124 124 static PredMap *createPredMap(const Digraph &g) 125 125 { … … 133 133 ///By default it is a NullMap. 134 134 typedef NullMap<typename Digraph::Node,bool> ProcessedMap; 135 ///Instantiates a \cProcessedMap.136 137 ///This function instantiates a \refProcessedMap.135 ///Instantiates a ProcessedMap. 136 137 ///This function instantiates a ProcessedMap. 138 138 ///\param g is the digraph, to which 139 ///we would like to define the \ref ProcessedMap.139 ///we would like to define the ProcessedMap 140 140 #ifdef DOXYGEN 141 141 static ProcessedMap *createProcessedMap(const Digraph &g) … … 152 152 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 153 153 typedef typename Digraph::template NodeMap<typename LM::Value> DistMap; 154 ///Instantiates a \cDistMap.155 156 ///This function instantiates a \refDistMap.154 ///Instantiates a DistMap. 155 156 ///This function instantiates a DistMap. 157 157 ///\param g is the digraph, to which we would like to define 158 ///the \ref DistMap.158 ///the DistMap 159 159 static DistMap *createDistMap(const Digraph &g) 160 160 { … … 217 217 ///The heap type used by the algorithm. 218 218 typedef typename TR::Heap Heap; 219 ///\brief The \ref DijkstraDefaultOperationTraits "operation traits class" 220 ///of the algorithm. 219 ///The operation traits class. 221 220 typedef typename TR::OperationTraits OperationTraits; 222 221 … … 234 233 const Digraph *G; 235 234 //Pointer to the length map. 236 const LengthMap * _length;235 const LengthMap *length; 237 236 //Pointer to the map of predecessors arcs. 238 237 PredMap *_pred; … … 299 298 }; 300 299 ///\brief \ref named-templ-param "Named parameter" for setting 301 /// \cPredMap type.300 ///PredMap type. 302 301 /// 303 302 ///\ref named-templ-param "Named parameter" for setting 304 /// \cPredMap type.303 ///PredMap type. 305 304 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 306 305 template <class T> … … 320 319 }; 321 320 ///\brief \ref named-templ-param "Named parameter" for setting 322 /// \cDistMap type.321 ///DistMap type. 323 322 /// 324 323 ///\ref named-templ-param "Named parameter" for setting 325 /// \cDistMap type.324 ///DistMap type. 326 325 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 327 326 template <class T> … … 341 340 }; 342 341 ///\brief \ref named-templ-param "Named parameter" for setting 343 /// \cProcessedMap type.342 ///ProcessedMap type. 344 343 /// 345 344 ///\ref named-templ-param "Named parameter" for setting 346 /// \cProcessedMap type.345 ///ProcessedMap type. 347 346 ///It must meet the \ref concepts::WriteMap "WriteMap" concept. 348 347 template <class T> … … 360 359 }; 361 360 ///\brief \ref named-templ-param "Named parameter" for setting 362 /// \cProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.361 ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 363 362 /// 364 363 ///\ref named-templ-param "Named parameter" for setting 365 /// \cProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.364 ///ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>. 366 365 ///If you don't set it explicitly, it will be automatically allocated. 367 366 struct SetStandardProcessedMap … … 441 440 /// 442 441 ///\ref named-templ-param "Named parameter" for setting 443 ///\ cOperationTraits type.442 ///\ref OperationTraits type. 444 443 template <class T> 445 444 struct SetOperationTraits … … 460 459 461 460 ///Constructor. 462 ///\param g The digraph the algorithm runs on.463 ///\param length The length map used by the algorithm.464 Dijkstra(const Digraph& g, const LengthMap&length) :465 G(& g), _length(&length),461 ///\param _g The digraph the algorithm runs on. 462 ///\param _length The length map used by the algorithm. 463 Dijkstra(const Digraph& _g, const LengthMap& _length) : 464 G(&_g), length(&_length), 466 465 _pred(NULL), local_pred(false), 467 466 _dist(NULL), local_dist(false), … … 487 486 Dijkstra &lengthMap(const LengthMap &m) 488 487 { 489 _length = &m;488 length = &m; 490 489 return *this; 491 490 } … … 640 639 switch(_heap->state(w)) { 641 640 case Heap::PRE_HEAP: 642 _heap->push(w,OperationTraits::plus(oldvalue, (* _length)[e]));641 _heap->push(w,OperationTraits::plus(oldvalue, (*length)[e])); 643 642 _pred->set(w,e); 644 643 break; 645 644 case Heap::IN_HEAP: 646 645 { 647 Value newvalue = OperationTraits::plus(oldvalue, (* _length)[e]);646 Value newvalue = OperationTraits::plus(oldvalue, (*length)[e]); 648 647 if ( OperationTraits::less(newvalue, (*_heap)[w]) ) { 649 648 _heap->decrease(w, newvalue);
Note: See TracChangeset
for help on using the changeset viewer.