lemon/johnson.h
changeset 1777 a70cee06ae9c
parent 1763 49045f2d28d4
child 1784 d9eb186547d7
equal deleted inserted replaced
7:c43068e6d3a2 8:96c30bc9b77b
   623     /// \brief Copies the shortest path to \c t into \c p
   623     /// \brief Copies the shortest path to \c t into \c p
   624     ///    
   624     ///    
   625     /// This function copies the shortest path to \c t into \c p.
   625     /// This function copies the shortest path to \c t into \c p.
   626     /// If it \c t is a source itself or unreachable, then it does not
   626     /// If it \c t is a source itself or unreachable, then it does not
   627     /// alter \c p.
   627     /// alter \c p.
   628     /// \todo Is it the right way to handle unreachable nodes?
       
   629     /// \return Returns \c true if a path to \c t was actually copied to \c p,
   628     /// \return Returns \c true if a path to \c t was actually copied to \c p,
   630     /// \c false otherwise.
   629     /// \c false otherwise.
   631     /// \sa DirPath
   630     /// \sa DirPath
   632     template <typename Path>
   631     template <typename Path>
   633     bool getPath(Path &p, Node source, Node target) {
   632     bool getPath(Path &p, Node source, Node target) {
   661     /// i.e. it returns the last edge of a shortest path from the node \c root 
   660     /// i.e. it returns the last edge of a shortest path from the node \c root 
   662     /// to \c node. It is \ref INVALID if \c node is unreachable from the root
   661     /// to \c node. It is \ref INVALID if \c node is unreachable from the root
   663     /// or if \c node=root. The shortest path tree used here is equal to the 
   662     /// or if \c node=root. The shortest path tree used here is equal to the 
   664     /// shortest path tree used in \ref predNode(). 
   663     /// shortest path tree used in \ref predNode(). 
   665     /// \pre \ref run() must be called before using this function.
   664     /// \pre \ref run() must be called before using this function.
   666     /// \todo predEdge could be a better name.
       
   667     Edge predEdge(Node root, Node node) const { 
   665     Edge predEdge(Node root, Node node) const { 
   668       return (*_pred)(root, node); 
   666       return (*_pred)(root, node); 
   669     }
   667     }
   670 
   668 
   671     /// \brief Returns the 'previous node' of the shortest path tree.
   669     /// \brief Returns the 'previous node' of the shortest path tree.