[Lemon-commits] [lemon_svn] jacint: r562 - hugo/trunk/src/test
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:40:14 CET 2006
Author: jacint
Date: Mon Apr 26 19:05:22 2004
New Revision: 562
Modified:
hugo/trunk/src/test/dijkstra_heap_test.cc
Log:
macro erase
Modified: hugo/trunk/src/test/dijkstra_heap_test.cc
==============================================================================
--- hugo/trunk/src/test/dijkstra_heap_test.cc (original)
+++ hugo/trunk/src/test/dijkstra_heap_test.cc Mon Apr 26 19:05:22 2004
@@ -3,8 +3,8 @@
//Fibonacci heap of fib_heap.h.
//The input is a graph in standard dimacs format from the standard input (like
-//in /hugo_loc/testfiles/dimacs). It runs dijkstra.h on this graph with
-//both heaps, checking two postconditions:
+//in /hugo_loc/testfiles/dimacs). It runs dijkstra.h on this graph with both
+//heaps, checking two postconditions:
//- if the edges e=uv of the shortest path tree reported by dijkstra.h have
//dist(v)-dist(u)=length(e)
@@ -20,7 +20,6 @@
#include <time_measure.h>
#include <bin_heap.h>
#include <fib_heap.h>
-#include <for_each_macros.h>
using namespace hugo;
@@ -56,7 +55,7 @@
int error1=0;
int error2=0;
- FOR_EACH_LOC ( EdgeIt, e, G) {
+ for(EdgeIt e=G.first(e); G.valid(e); G.next(e)) {
Node u=G.tail(e);
Node v=G.head(e);
if ( dijkstra_test.dist(v) - dijkstra_test.dist(u) > cap[e] )
@@ -68,7 +67,7 @@
}
}
- FOR_EACH_LOC ( NodeIt, v, G) {
+ for(NodeIt v=G.first(v); G.valid(v); G.next(v)) {
if ( dijkstra_test.reached(v) ) {
Edge e=dijkstra_test.pred(v);
Node u=G.tail(e);
@@ -104,7 +103,7 @@
error1=0;
error2=0;
- FOR_EACH_LOC ( EdgeIt, e, G) {
+ for(EdgeIt e=G.first(e); G.valid(e); G.next(e)) {
Node u=G.tail(e);
Node v=G.head(e);
if ( dijkstra_test2.dist(v) - dijkstra_test2.dist(u) > cap[e] )
@@ -116,7 +115,7 @@
}
}
- FOR_EACH_LOC ( NodeIt, v, G) {
+ for(NodeIt v=G.first(v); G.valid(v); G.next(v)) {
if ( dijkstra_test2.reached(v) ) {
Edge e=dijkstra_test2.pred(v);
Node u=G.tail(e);
More information about the Lemon-commits
mailing list