lemon/belmann_ford.h
changeset 1763 49045f2d28d4
parent 1754 4bf5ceb49023
child 1765 f15b3c09481c
     1.1 --- a/lemon/belmann_ford.h	Fri Nov 04 13:53:22 2005 +0000
     1.2 +++ b/lemon/belmann_ford.h	Fri Nov 04 14:48:10 2005 +0000
     1.3 @@ -503,8 +503,8 @@
     1.4        if(reached(t)) {
     1.5  	p.clear();
     1.6  	typename Path::Builder b(p);
     1.7 -	for(b.setStartNode(t);pred(t)!=INVALID;t=predNode(t))
     1.8 -	  b.pushFront(pred(t));
     1.9 +	for(b.setStartNode(t);predEdge(t)!=INVALID;t=predNode(t))
    1.10 +	  b.pushFront(predEdge(t));
    1.11  	b.commit();
    1.12  	return true;
    1.13        }
    1.14 @@ -529,7 +529,7 @@
    1.15      /// \pre \ref run() must be called before using
    1.16      /// this function.
    1.17      /// \todo predEdge could be a better name.
    1.18 -    Edge pred(Node v) const { return (*_pred)[v]; }
    1.19 +    Edge predEdge(Node v) const { return (*_pred)[v]; }
    1.20  
    1.21      /// \brief Returns the 'previous node' of the shortest path tree.
    1.22      ///
    1.23 @@ -537,7 +537,7 @@
    1.24      /// tree, i.e. it returns the last but one node from a shortest path from 
    1.25      /// the root to \c /v. It is INVALID if \c v is unreachable from the root 
    1.26      /// or if \c v=s. The shortest path tree used here is equal to the 
    1.27 -    /// shortest path tree used in \ref pred().  \pre \ref run() must be 
    1.28 +    /// shortest path tree used in \ref predEdge().  \pre \ref run() must be 
    1.29      /// called before using this function.
    1.30      Node predNode(Node v) const { 
    1.31        return (*_pred)[v] == INVALID ? INVALID : graph->source((*_pred)[v]);