Changeset 229:ae5f9ca94be7 in lemon-0.x for src/work/alpar

Ignore:
Timestamp:
03/22/04 11:21:30 (17 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@326
Message:
File:
1 edited

Unmodified
Removed
• src/work/alpar/dijkstra/dijkstra.h

 r228 //Alpar: Changed the order of the parameters ///Dijkstra algorithm class. ///This class provides an efficient implementation of Dijkstra algorithm. ///%Dijkstra algorithm class. ///This class provides an efficient implementation of %Dijkstra algorithm. ///The edge lengths are passed to the algorithm using a ///\ref ReadMapSkeleton "readable map", ///may involve in relatively time consuming process to compute the edge ///length if it is necessary. ///\param Heap The heap type used by the Dijkstra ///\param Heap The heap type used by the %Dijkstra ///algorithm. The default ///is using \ref BinHeap "binary heap". ///Returns the distance of a node from the source. ///\pre \ref run() must be called before using this function. ///\warning If node \c v in unreachable from \c s the return value ///\warning If node \c v in unreachable from the source the return value ///of this funcion is undefined. ValueType dist(Node v) const { return distance[v]; } ///For a node \c v it returns the last edge of the shortest path ///from \c s to \c v or INVALID if \c v is unreachable from \c s. ///from the source to \c v or INVALID if \c v is unreachable ///from the source. ///\pre \ref run() must be called before using this function. Edge pred(Node v) const { return predecessor[v]; } ///For a node \c v it returns the last but one node of the shortest path ///from \c s to \c v or INVALID if \c v is unreachable from \c s. ///from the source to \c v or INVALID if \c v is unreachable ///from the source. ///\pre \ref run() must be called before using this function. Node predNode(Node v) const { return pred_node[v]; } //    bool reached(Node v) { return reach[v]; } ///Chech if a node is reachable from \c s. ///Returns \c true if \c v is reachable from \c s. ///\warning \c s is reported to be unreached! ///Chechs if a node is reachable from the source. ///Returns \c true if \c v is reachable from the source. ///\warning the source node is reported to be unreached! ///\todo Is this what we want? ///\pre \ref run() must be called before using this function. // ********************************************************************** ///Runs Dijkstra algorithm from node \c s. ///This method runs the Dijkstra algorithm from node \c s in order to ///Runs %Dijkstra algorithm from node the source. ///This method runs the %Dijkstra algorithm from a source node \c s ///in order to ///compute the ///shortest path to each node. The algorithm computes ///- The shortest path tree. ///- The distance of each node. ///- The distance of each node from the source. template void Dijkstra::run(Node s) {
Note: See TracChangeset for help on using the changeset viewer.