[Lemon-commits] [lemon_svn] alpar: r2001 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:49:24 CET 2006
Author: alpar
Date: Mon Jun 27 16:39:53 2005
New Revision: 2001
Modified:
hugo/trunk/lemon/bfs.h
hugo/trunk/lemon/dfs.h
hugo/trunk/lemon/dijkstra.h
Log:
processNextXyz() returns the processed object.
Modified: hugo/trunk/lemon/bfs.h
==============================================================================
--- hugo/trunk/lemon/bfs.h (original)
+++ hugo/trunk/lemon/bfs.h Mon Jun 27 16:39:53 2005
@@ -517,8 +517,10 @@
///Processes the next node.
///
+ ///\return The processed node.
+ ///
///\warning The queue must not be empty!
- void processNextNode()
+ Node processNextNode()
{
if(_queue_tail==_queue_next_dist) {
_curr_dist++;
@@ -535,6 +537,7 @@
// _pred_node->set(m,n);
_dist->set(m,_curr_dist);
}
+ return n;
}
///\brief Returns \c false if there are nodes
Modified: hugo/trunk/lemon/dfs.h
==============================================================================
--- hugo/trunk/lemon/dfs.h (original)
+++ hugo/trunk/lemon/dfs.h Mon Jun 27 16:39:53 2005
@@ -516,8 +516,10 @@
///Processes the next node.
///
+ ///\return The processed edge.
+ ///
///\pre The stack must not be empty!
- void processNextEdge()
+ Edge processNextEdge()
{
Node m;
Edge e=_stack[_stack_head];
@@ -539,6 +541,7 @@
--_stack_head;
}
}
+ return e;
}
///\brief Returns \c false if there are nodes
Modified: hugo/trunk/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/lemon/dijkstra.h (original)
+++ hugo/trunk/lemon/dijkstra.h Mon Jun 27 16:39:53 2005
@@ -510,8 +510,10 @@
///Processes the next node in the priority heap.
///
+ ///\return The processed node.
+ ///
///\warning The priority heap must not be empty!
- void processNextNode()
+ Node processNextNode()
{
Node v=_heap.top();
Value oldvalue=_heap[v];
@@ -537,6 +539,7 @@
break;
}
}
+ return v;
}
///\brief Returns \c false if there are nodes
More information about the Lemon-commits
mailing list