diff -r 7f6e2bd76654 -r 141f9c0db4a3 test/bellman_ford_test.cc --- a/test/bellman_ford_test.cc Wed Mar 17 12:35:52 2010 +0100 +++ b/test/bellman_ford_test.cc Sat Mar 06 14:35:12 2010 +0000 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2009 + * Copyright (C) 2003-2010 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -97,7 +97,7 @@ p = const_bf_test.predMap(); pp = const_bf_test.path(t); pp = const_bf_test.negativeCycle(); - + for (BF::ActiveIt it(const_bf_test); it != INVALID; ++it) {} } { @@ -110,7 +110,7 @@ LengthMap length_map; concepts::ReadWriteMap pred_map; concepts::ReadWriteMap dist_map; - + bf_test .lengthMap(length_map) .predMap(pred_map) @@ -189,7 +189,7 @@ check(checkPath(gr, p), "path() found a wrong path."); check(pathSource(gr, p) == s, "path() found a wrong path."); check(pathTarget(gr, p) == t, "path() found a wrong path."); - + ListPath path; Value dist; bool reached = bellmanFord(gr,length).path(path).dist(dist).run(s,t); @@ -228,18 +228,18 @@ SmartDigraph gr; IntArcMap length(gr); - + Node n1 = gr.addNode(); Node n2 = gr.addNode(); Node n3 = gr.addNode(); Node n4 = gr.addNode(); - + Arc a1 = gr.addArc(n1, n2); Arc a2 = gr.addArc(n2, n2); - + length[a1] = 2; length[a2] = -1; - + { BellmanFord bf(gr, length); bf.run(n1); @@ -247,21 +247,21 @@ check(p.length() == 1 && p.front() == p.back() && p.front() == a2, "Wrong negative cycle."); } - + length[a2] = 0; - + { BellmanFord bf(gr, length); bf.run(n1); check(bf.negativeCycle().empty(), "Negative cycle should not be found."); } - + length[gr.addArc(n1, n3)] = 5; length[gr.addArc(n4, n3)] = 1; length[gr.addArc(n2, n4)] = 2; length[gr.addArc(n3, n2)] = -4; - + { BellmanFord bf(gr, length); bf.init();