diff -r 7f6e2bd76654 -r 141f9c0db4a3 test/suurballe_test.cc --- a/test/suurballe_test.cc Wed Mar 17 12:35:52 2010 +0100 +++ b/test/suurballe_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). * @@ -81,7 +81,7 @@ typedef Digraph::Node Node; typedef Digraph::Arc Arc; typedef concepts::ReadMap LengthMap; - + typedef Suurballe ST; typedef Suurballe ::SetFlowMap @@ -114,7 +114,7 @@ k = suurb_test.findFlow(n); k = suurb_test.findFlow(n, k); suurb_test.findPaths(); - + int f; VType c; c = const_suurb_test.totalLength(); @@ -126,7 +126,7 @@ const_suurb_test.potentialMap(); k = const_suurb_test.pathNum(); Path p = const_suurb_test.path(k); - + ignore_unused_variable_warning(fm); ignore_unused_variable_warning(pm); } @@ -208,7 +208,7 @@ // Check run() { Suurballe suurballe(digraph, length); - + // Find 2 paths check(suurballe.run(s, t) == 2, "Wrong number of paths"); check(checkFlow(digraph, suurballe.flowMap(), s, t, 2), @@ -219,7 +219,7 @@ "Wrong potentials"); for (int i = 0; i < suurballe.pathNum(); ++i) check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); - + // Find 3 paths check(suurballe.run(s, t, 3) == 3, "Wrong number of paths"); check(checkFlow(digraph, suurballe.flowMap(), s, t, 3), @@ -230,7 +230,7 @@ "Wrong potentials"); for (int i = 0; i < suurballe.pathNum(); ++i) check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); - + // Find 5 paths (only 3 can be found) check(suurballe.run(s, t, 5) == 3, "Wrong number of paths"); check(checkFlow(digraph, suurballe.flowMap(), s, t, 3), @@ -242,12 +242,12 @@ for (int i = 0; i < suurballe.pathNum(); ++i) check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path"); } - + // Check fullInit() + start() { Suurballe suurballe(digraph, length); suurballe.fullInit(s); - + // Find 2 paths check(suurballe.start(t) == 2, "Wrong number of paths"); check(suurballe.totalLength() == 510, "The flow is not optimal");