diff -r 2f64c4a692a8 -r 7f26c4b32651 test/suurballe_test.cc --- a/test/suurballe_test.cc Tue Oct 28 18:39:53 2008 +0000 +++ b/test/suurballe_test.cc Tue Oct 28 23:10:27 2008 +0100 @@ -28,7 +28,7 @@ using namespace lemon; -// Checks the feasibility of the flow +// Check the feasibility of the flow template bool checkFlow( const Digraph& gr, const FlowMap& flow, typename Digraph::Node s, typename Digraph::Node t, @@ -52,13 +52,13 @@ return true; } -// Checks the optimalitiy of the flow +// Check the optimalitiy of the flow template < typename Digraph, typename CostMap, typename FlowMap, typename PotentialMap > bool checkOptimality( const Digraph& gr, const CostMap& cost, const FlowMap& flow, const PotentialMap& pi ) { - // Checking the Complementary Slackness optimality condition + // Check the "Complementary Slackness" optimality condition TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); bool opt = true; for (ArcIt e(gr); e != INVALID; ++e) { @@ -71,12 +71,12 @@ return opt; } -// Checks a path -template < typename Digraph, typename Path > +// Check a path +template bool checkPath( const Digraph& gr, const Path& path, typename Digraph::Node s, typename Digraph::Node t) { - // Checking the Complementary Slackness optimality condition + // Check the "Complementary Slackness" optimality condition TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); Node n = s; for (int i = 0; i < path.length(); ++i) { @@ -91,7 +91,7 @@ { DIGRAPH_TYPEDEFS(ListDigraph); - // Reading the test digraph + // Read the test digraph ListDigraph digraph; ListDigraph::ArcMap length(digraph); Node source, target; @@ -111,7 +111,7 @@ run(); input.close(); - // Finding 2 paths + // Find 2 paths { Suurballe suurballe(digraph, length, source, target); check(suurballe.run(2) == 2, "Wrong number of paths"); @@ -126,7 +126,7 @@ "Wrong path"); } - // Finding 3 paths + // Find 3 paths { Suurballe suurballe(digraph, length, source, target); check(suurballe.run(3) == 3, "Wrong number of paths"); @@ -141,7 +141,7 @@ "Wrong path"); } - // Finding 5 paths (only 3 can be found) + // Find 5 paths (only 3 can be found) { Suurballe suurballe(digraph, length, source, target); check(suurballe.run(5) == 3, "Wrong number of paths");