processNextXyz() returns the processed object.
authoralpar
Mon, 27 Jun 2005 14:39:53 +0000
changeset 15164aeda8d11d5e
parent 1515 dd7616b51333
child 1517 b303c1741c9a
processNextXyz() returns the processed object.
lemon/bfs.h
lemon/dfs.h
lemon/dijkstra.h
     1.1 --- a/lemon/bfs.h	Mon Jun 27 10:49:37 2005 +0000
     1.2 +++ b/lemon/bfs.h	Mon Jun 27 14:39:53 2005 +0000
     1.3 @@ -517,8 +517,10 @@
     1.4  
     1.5      ///Processes the next node.
     1.6      ///
     1.7 +    ///\return The processed node.
     1.8 +    ///
     1.9      ///\warning The queue must not be empty!
    1.10 -    void processNextNode()
    1.11 +    Node processNextNode()
    1.12      {
    1.13        if(_queue_tail==_queue_next_dist) {
    1.14  	_curr_dist++;
    1.15 @@ -535,6 +537,7 @@
    1.16  // 	  _pred_node->set(m,n);
    1.17  	  _dist->set(m,_curr_dist);
    1.18  	}
    1.19 +      return n;
    1.20      }
    1.21        
    1.22      ///\brief Returns \c false if there are nodes
     2.1 --- a/lemon/dfs.h	Mon Jun 27 10:49:37 2005 +0000
     2.2 +++ b/lemon/dfs.h	Mon Jun 27 14:39:53 2005 +0000
     2.3 @@ -516,8 +516,10 @@
     2.4  
     2.5      ///Processes the next node.
     2.6      ///
     2.7 +    ///\return The processed edge.
     2.8 +    ///
     2.9      ///\pre The stack must not be empty!
    2.10 -    void processNextEdge()
    2.11 +    Edge processNextEdge()
    2.12      { 
    2.13        Node m;
    2.14        Edge e=_stack[_stack_head];
    2.15 @@ -539,6 +541,7 @@
    2.16  	    --_stack_head;
    2.17  	  }
    2.18        }
    2.19 +      return e;
    2.20      }
    2.21        
    2.22      ///\brief Returns \c false if there are nodes
     3.1 --- a/lemon/dijkstra.h	Mon Jun 27 10:49:37 2005 +0000
     3.2 +++ b/lemon/dijkstra.h	Mon Jun 27 14:39:53 2005 +0000
     3.3 @@ -510,8 +510,10 @@
     3.4  
     3.5      ///Processes the next node in the priority heap.
     3.6      ///
     3.7 +    ///\return The processed node.
     3.8 +    ///
     3.9      ///\warning The priority heap must not be empty!
    3.10 -    void processNextNode()
    3.11 +    Node processNextNode()
    3.12      {
    3.13        Node v=_heap.top(); 
    3.14        Value oldvalue=_heap[v];
    3.15 @@ -537,6 +539,7 @@
    3.16  	  break;
    3.17  	}
    3.18        }
    3.19 +      return v;
    3.20      }
    3.21  
    3.22      ///\brief Returns \c false if there are nodes