test/suurballe_test.cc
changeset 877 141f9c0db4a3
parent 858 9f6ed854d409
child 970 d216e1c8b3fa
     1.1 --- a/test/suurballe_test.cc	Wed Mar 17 12:35:52 2010 +0100
     1.2 +++ b/test/suurballe_test.cc	Sat Mar 06 14:35:12 2010 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2010
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -81,7 +81,7 @@
    1.13    typedef Digraph::Node Node;
    1.14    typedef Digraph::Arc Arc;
    1.15    typedef concepts::ReadMap<Arc, VType> LengthMap;
    1.16 -  
    1.17 +
    1.18    typedef Suurballe<Digraph, LengthMap> ST;
    1.19    typedef Suurballe<Digraph, LengthMap>
    1.20      ::SetFlowMap<ST::FlowMap>
    1.21 @@ -114,7 +114,7 @@
    1.22    k = suurb_test.findFlow(n);
    1.23    k = suurb_test.findFlow(n, k);
    1.24    suurb_test.findPaths();
    1.25 -  
    1.26 +
    1.27    int f;
    1.28    VType c;
    1.29    c = const_suurb_test.totalLength();
    1.30 @@ -126,7 +126,7 @@
    1.31      const_suurb_test.potentialMap();
    1.32    k = const_suurb_test.pathNum();
    1.33    Path<Digraph> p = const_suurb_test.path(k);
    1.34 -  
    1.35 +
    1.36    ignore_unused_variable_warning(fm);
    1.37    ignore_unused_variable_warning(pm);
    1.38  }
    1.39 @@ -208,7 +208,7 @@
    1.40    // Check run()
    1.41    {
    1.42      Suurballe<ListDigraph> suurballe(digraph, length);
    1.43 -    
    1.44 +
    1.45      // Find 2 paths
    1.46      check(suurballe.run(s, t) == 2, "Wrong number of paths");
    1.47      check(checkFlow(digraph, suurballe.flowMap(), s, t, 2),
    1.48 @@ -219,7 +219,7 @@
    1.49            "Wrong potentials");
    1.50      for (int i = 0; i < suurballe.pathNum(); ++i)
    1.51        check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    1.52 -   
    1.53 +
    1.54      // Find 3 paths
    1.55      check(suurballe.run(s, t, 3) == 3, "Wrong number of paths");
    1.56      check(checkFlow(digraph, suurballe.flowMap(), s, t, 3),
    1.57 @@ -230,7 +230,7 @@
    1.58            "Wrong potentials");
    1.59      for (int i = 0; i < suurballe.pathNum(); ++i)
    1.60        check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    1.61 -    
    1.62 +
    1.63      // Find 5 paths (only 3 can be found)
    1.64      check(suurballe.run(s, t, 5) == 3, "Wrong number of paths");
    1.65      check(checkFlow(digraph, suurballe.flowMap(), s, t, 3),
    1.66 @@ -242,12 +242,12 @@
    1.67      for (int i = 0; i < suurballe.pathNum(); ++i)
    1.68        check(checkPath(digraph, suurballe.path(i), s, t), "Wrong path");
    1.69    }
    1.70 -  
    1.71 +
    1.72    // Check fullInit() + start()
    1.73    {
    1.74      Suurballe<ListDigraph> suurballe(digraph, length);
    1.75      suurballe.fullInit(s);
    1.76 -    
    1.77 +
    1.78      // Find 2 paths
    1.79      check(suurballe.start(t) == 2, "Wrong number of paths");
    1.80      check(suurballe.totalLength() == 510, "The flow is not optimal");