lemon/dijkstra.h
changeset 1638 4e50ed042394
parent 1536 308150155bb5
child 1665 fdeb961110ac
equal deleted inserted replaced
2:a3df76ba55a9 3:ab175778263c
   700     ///For a node \c v it returns the 'previous edge' of the shortest path tree,
   700     ///For a node \c v it returns the 'previous edge' of the shortest path tree,
   701     ///i.e. it returns the last edge of a shortest path from the root to \c
   701     ///i.e. it returns the last edge of a shortest path from the root to \c
   702     ///v. It is \ref INVALID
   702     ///v. It is \ref INVALID
   703     ///if \c v is unreachable from the root or if \c v=s. The
   703     ///if \c v is unreachable from the root or if \c v=s. The
   704     ///shortest path tree used here is equal to the shortest path tree used in
   704     ///shortest path tree used here is equal to the shortest path tree used in
   705     ///\ref predNode(Node v).  \pre \ref run() must be called before using
   705     ///\ref predNode().  \pre \ref run() must be called before using
   706     ///this function.
   706     ///this function.
   707     ///\todo predEdge could be a better name.
   707     ///\todo predEdge could be a better name.
   708     Edge pred(Node v) const { return (*_pred)[v]; }
   708     Edge pred(Node v) const { return (*_pred)[v]; }
   709 
   709 
   710     ///Returns the 'previous node' of the shortest path tree.
   710     ///Returns the 'previous node' of the shortest path tree.
   711 
   711 
   712     ///For a node \c v it returns the 'previous node' of the shortest path tree,
   712     ///For a node \c v it returns the 'previous node' of the shortest path tree,
   713     ///i.e. it returns the last but one node from a shortest path from the
   713     ///i.e. it returns the last but one node from a shortest path from the
   714     ///root to \c /v. It is INVALID if \c v is unreachable from the root or if
   714     ///root to \c /v. It is INVALID if \c v is unreachable from the root or if
   715     ///\c v=s. The shortest path tree used here is equal to the shortest path
   715     ///\c v=s. The shortest path tree used here is equal to the shortest path
   716     ///tree used in \ref pred(Node v).  \pre \ref run() must be called before
   716     ///tree used in \ref pred().  \pre \ref run() must be called before
   717     ///using this function.
   717     ///using this function.
   718     Node predNode(Node v) const { return (*_pred)[v]==INVALID ? INVALID:
   718     Node predNode(Node v) const { return (*_pred)[v]==INVALID ? INVALID:
   719 				  G->source((*_pred)[v]); }
   719 				  G->source((*_pred)[v]); }
   720     
   720     
   721     ///Returns a reference to the NodeMap of distances.
   721     ///Returns a reference to the NodeMap of distances.