DocFix
authoralpar
Mon, 22 Mar 2004 10:21:30 +0000
changeset 229ae5f9ca94be7
parent 228 1d5f4cd0342c
child 230 734dd0649941
DocFix
src/work/alpar/dijkstra/dijkstra.h
     1.1 --- a/src/work/alpar/dijkstra/dijkstra.h	Sun Mar 21 18:43:15 2004 +0000
     1.2 +++ b/src/work/alpar/dijkstra/dijkstra.h	Mon Mar 22 10:21:30 2004 +0000
     1.3 @@ -34,9 +34,9 @@
     1.4    
     1.5    //Alpar: Changed the order of the parameters
     1.6    
     1.7 -  ///Dijkstra algorithm class.
     1.8 +  ///%Dijkstra algorithm class.
     1.9  
    1.10 -  ///This class provides an efficient implementation of Dijkstra algorithm.
    1.11 +  ///This class provides an efficient implementation of %Dijkstra algorithm.
    1.12    ///The edge lengths are passed to the algorithm using a
    1.13    ///\ref ReadMapSkeleton "readable map",
    1.14    ///so it is easy to change it to any kind of length.
    1.15 @@ -50,7 +50,7 @@
    1.16    ///lengths of the edges. It is read once for each edge, so the map
    1.17    ///may involve in relatively time consuming process to compute the edge
    1.18    ///length if it is necessary.
    1.19 -  ///\param Heap The heap type used by the Dijkstra
    1.20 +  ///\param Heap The heap type used by the %Dijkstra
    1.21    ///algorithm. The default
    1.22    ///is using \ref BinHeap "binary heap".
    1.23    template <typename Graph,
    1.24 @@ -97,19 +97,21 @@
    1.25  
    1.26      ///Returns the distance of a node from the source.
    1.27      ///\pre \ref run() must be called before using this function.
    1.28 -    ///\warning If node \c v in unreachable from \c s the return value
    1.29 +    ///\warning If node \c v in unreachable from the source the return value
    1.30      ///of this funcion is undefined.
    1.31      ValueType dist(Node v) const { return distance[v]; }
    1.32      ///Returns the edges of the shortest path tree.
    1.33  
    1.34      ///For a node \c v it returns the last edge of the shortest path
    1.35 -    ///from \c s to \c v or INVALID if \c v is unreachable from \c s.
    1.36 +    ///from the source to \c v or INVALID if \c v is unreachable
    1.37 +    ///from the source.
    1.38      ///\pre \ref run() must be called before using this function.
    1.39      Edge pred(Node v) const { return predecessor[v]; }
    1.40      ///Returns the nodes of the shortest paths.
    1.41  
    1.42      ///For a node \c v it returns the last but one node of the shortest path
    1.43 -    ///from \c s to \c v or INVALID if \c v is unreachable from \c s.
    1.44 +    ///from the source to \c v or INVALID if \c v is unreachable
    1.45 +    ///from the source.
    1.46      ///\pre \ref run() must be called before using this function.
    1.47      Node predNode(Node v) const { return pred_node[v]; }
    1.48      
    1.49 @@ -133,10 +135,10 @@
    1.50  
    1.51      //    bool reached(Node v) { return reach[v]; }
    1.52  
    1.53 -    ///Chech if a node is reachable from \c s.
    1.54 +    ///Chechs if a node is reachable from the source.
    1.55  
    1.56 -    ///Returns \c true if \c v is reachable from \c s.
    1.57 -    ///\warning \c s is reported to be unreached!
    1.58 +    ///Returns \c true if \c v is reachable from the source.
    1.59 +    ///\warning the source node is reported to be unreached!
    1.60      ///\todo Is this what we want?
    1.61      ///\pre \ref run() must be called before using this function.
    1.62      ///
    1.63 @@ -149,13 +151,14 @@
    1.64    //  IMPLEMENTATIONS
    1.65    // **********************************************************************
    1.66  
    1.67 -  ///Runs Dijkstra algorithm from node \c s.
    1.68 +  ///Runs %Dijkstra algorithm from node the source.
    1.69  
    1.70 -  ///This method runs the Dijkstra algorithm from node \c s in order to
    1.71 +  ///This method runs the %Dijkstra algorithm from a source node \c s
    1.72 +  ///in order to
    1.73    ///compute the
    1.74    ///shortest path to each node. The algorithm computes
    1.75    ///- The shortest path tree.
    1.76 -  ///- The distance of each node.
    1.77 +  ///- The distance of each node from the source.
    1.78    template <typename Graph, typename LengthMap, typename Heap >
    1.79    void Dijkstra<Graph,LengthMap,Heap>::run(Node s) {
    1.80