Changeset 229:ae5f9ca94be7 in lemon0.x for src/work/alpar
 Timestamp:
 03/22/04 11:21:30 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@326
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/alpar/dijkstra/dijkstra.h
r228 r229 35 35 //Alpar: Changed the order of the parameters 36 36 37 /// Dijkstra algorithm class.38 39 ///This class provides an efficient implementation of Dijkstra algorithm.37 ///%Dijkstra algorithm class. 38 39 ///This class provides an efficient implementation of %Dijkstra algorithm. 40 40 ///The edge lengths are passed to the algorithm using a 41 41 ///\ref ReadMapSkeleton "readable map", … … 51 51 ///may involve in relatively time consuming process to compute the edge 52 52 ///length if it is necessary. 53 ///\param Heap The heap type used by the Dijkstra53 ///\param Heap The heap type used by the %Dijkstra 54 54 ///algorithm. The default 55 55 ///is using \ref BinHeap "binary heap". … … 98 98 ///Returns the distance of a node from the source. 99 99 ///\pre \ref run() must be called before using this function. 100 ///\warning If node \c v in unreachable from \c sthe return value100 ///\warning If node \c v in unreachable from the source the return value 101 101 ///of this funcion is undefined. 102 102 ValueType dist(Node v) const { return distance[v]; } … … 104 104 105 105 ///For a node \c v it returns the last edge of the shortest path 106 ///from \c s to \c v or INVALID if \c v is unreachable from \c s. 106 ///from the source to \c v or INVALID if \c v is unreachable 107 ///from the source. 107 108 ///\pre \ref run() must be called before using this function. 108 109 Edge pred(Node v) const { return predecessor[v]; } … … 110 111 111 112 ///For a node \c v it returns the last but one node of the shortest path 112 ///from \c s to \c v or INVALID if \c v is unreachable from \c s. 113 ///from the source to \c v or INVALID if \c v is unreachable 114 ///from the source. 113 115 ///\pre \ref run() must be called before using this function. 114 116 Node predNode(Node v) const { return pred_node[v]; } … … 134 136 // bool reached(Node v) { return reach[v]; } 135 137 136 ///Chech if a node is reachable from \c s.137 138 ///Returns \c true if \c v is reachable from \c s.139 ///\warning \c sis reported to be unreached!138 ///Chechs if a node is reachable from the source. 139 140 ///Returns \c true if \c v is reachable from the source. 141 ///\warning the source node is reported to be unreached! 140 142 ///\todo Is this what we want? 141 143 ///\pre \ref run() must be called before using this function. … … 150 152 // ********************************************************************** 151 153 152 ///Runs Dijkstra algorithm from node \c s. 153 154 ///This method runs the Dijkstra algorithm from node \c s in order to 154 ///Runs %Dijkstra algorithm from node the source. 155 156 ///This method runs the %Dijkstra algorithm from a source node \c s 157 ///in order to 155 158 ///compute the 156 159 ///shortest path to each node. The algorithm computes 157 160 /// The shortest path tree. 158 /// The distance of each node .161 /// The distance of each node from the source. 159 162 template <typename Graph, typename LengthMap, typename Heap > 160 163 void Dijkstra<Graph,LengthMap,Heap>::run(Node s) {
Note: See TracChangeset
for help on using the changeset viewer.