Merge #453 to branches >=1.2
authorAlpar Juttner <alpar@cs.elte.hu>
Wed, 28 Nov 2012 11:54:43 +0100
changeset 1008d216e1c8b3fa
parent 999 00f8d9f9920d
parent 1007 7e368d9b67f7
child 1009 a26b90a17c81
Merge #453 to branches >=1.2
lemon/concepts/graph_components.h
test/bfs_test.cc
test/circulation_test.cc
test/dfs_test.cc
test/dijkstra_test.cc
test/gomory_hu_test.cc
test/hao_orlin_test.cc
test/matching_test.cc
test/min_cost_arborescence_test.cc
test/preflow_test.cc
test/suurballe_test.cc
tools/dimacs-solver.cc
     1.1 --- a/lemon/concepts/graph_components.h	Thu Sep 13 12:02:27 2012 +0200
     1.2 +++ b/lemon/concepts/graph_components.h	Wed Nov 28 11:54:43 2012 +0100
     1.3 @@ -108,6 +108,8 @@
     1.4            i1 = i2 = i3;
     1.5  
     1.6            bool b;
     1.7 +          ignore_unused_variable_warning(b);
     1.8 +
     1.9            b = (ia == ib) && (ia != ib);
    1.10            b = (ia == INVALID) && (ib != INVALID);
    1.11            b = (ia < ib);
     2.1 --- a/test/bfs_test.cc	Thu Sep 13 12:02:27 2012 +0200
     2.2 +++ b/test/bfs_test.cc	Wed Nov 28 11:54:43 2012 +0100
     2.3 @@ -61,6 +61,7 @@
     2.4    Node s, t, n;
     2.5    Arc e;
     2.6    int l, i;
     2.7 +  ignore_unused_variable_warning(l,i);
     2.8    bool b;
     2.9    BType::DistMap d(G);
    2.10    BType::PredMap p(G);
    2.11 @@ -150,6 +151,8 @@
    2.12  
    2.13    Digraph g;
    2.14    bool b;
    2.15 +  ignore_unused_variable_warning(b);
    2.16 +
    2.17    bfs(g).run(Node());
    2.18    b=bfs(g).run(Node(),Node());
    2.19    bfs(g).run();
     3.1 --- a/test/circulation_test.cc	Thu Sep 13 12:02:27 2012 +0200
     3.2 +++ b/test/circulation_test.cc	Wed Nov 28 11:54:43 2012 +0100
     3.3 @@ -73,6 +73,7 @@
     3.4    BarrierMap bar;
     3.5    VType v;
     3.6    bool b;
     3.7 +  ignore_unused_variable_warning(v,b);
     3.8  
     3.9    typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
    3.10              ::SetFlowMap<FlowMap>
     4.1 --- a/test/dfs_test.cc	Thu Sep 13 12:02:27 2012 +0200
     4.2 +++ b/test/dfs_test.cc	Wed Nov 28 11:54:43 2012 +0100
     4.3 @@ -67,6 +67,8 @@
     4.4    Arc e;
     4.5    int l, i;
     4.6    bool b;
     4.7 +  ignore_unused_variable_warning(l,i,b);
     4.8 +
     4.9    DType::DistMap d(G);
    4.10    DType::PredMap p(G);
    4.11    Path<Digraph> pp;
    4.12 @@ -151,6 +153,8 @@
    4.13  
    4.14    Digraph g;
    4.15    bool b;
    4.16 +  ignore_unused_variable_warning(b);
    4.17 +
    4.18    dfs(g).run(Node());
    4.19    b=dfs(g).run(Node(),Node());
    4.20    dfs(g).run();
     5.1 --- a/test/dijkstra_test.cc	Thu Sep 13 12:02:27 2012 +0200
     5.2 +++ b/test/dijkstra_test.cc	Wed Nov 28 11:54:43 2012 +0100
     5.3 @@ -65,6 +65,8 @@
     5.4    VType l;
     5.5    int i;
     5.6    bool b;
     5.7 +  ignore_unused_variable_warning(l,i,b);
     5.8 +
     5.9    DType::DistMap d(G);
    5.10    DType::PredMap p(G);
    5.11    LengthMap length;
    5.12 @@ -162,6 +164,8 @@
    5.13  
    5.14    Digraph g;
    5.15    bool b;
    5.16 +  ignore_unused_variable_warning(b);
    5.17 +
    5.18    dijkstra(g,LengthMap()).run(Node());
    5.19    b=dijkstra(g,LengthMap()).run(Node(),Node());
    5.20    dijkstra(g,LengthMap())
     6.1 --- a/test/gomory_hu_test.cc	Thu Sep 13 12:02:27 2012 +0200
     6.2 +++ b/test/gomory_hu_test.cc	Wed Nov 28 11:54:43 2012 +0100
     6.3 @@ -68,6 +68,7 @@
     6.4    CutMap cut;
     6.5    Value v;
     6.6    int d;
     6.7 +  ignore_unused_variable_warning(v,d);
     6.8  
     6.9    GomoryHu<Graph, CapMap> gh_test(g, cap);
    6.10    const GomoryHu<Graph, CapMap>&
     7.1 --- a/test/hao_orlin_test.cc	Thu Sep 13 12:02:27 2012 +0200
     7.2 +++ b/test/hao_orlin_test.cc	Wed Nov 28 11:54:43 2012 +0100
     7.3 @@ -66,6 +66,7 @@
     7.4    CapMap cap;
     7.5    CutMap cut;
     7.6    Value v;
     7.7 +  ignore_unused_variable_warning(v);
     7.8  
     7.9    HaoOrlin<Digraph, CapMap> ho_test(g, cap);
    7.10    const HaoOrlin<Digraph, CapMap>&
     8.1 --- a/test/matching_test.cc	Thu Sep 13 12:02:27 2012 +0200
     8.2 +++ b/test/matching_test.cc	Wed Nov 28 11:54:43 2012 +0100
     8.3 @@ -145,6 +145,7 @@
     8.4  
     8.5    MaxMatching<Graph>::Status stat =
     8.6      const_mat_test.status(n);
     8.7 +  ignore_unused_variable_warning(stat);
     8.8    const MaxMatching<Graph>::StatusMap& smap =
     8.9      const_mat_test.statusMap();
    8.10    stat = smap[n];
     9.1 --- a/test/min_cost_arborescence_test.cc	Thu Sep 13 12:02:27 2012 +0200
     9.2 +++ b/test/min_cost_arborescence_test.cc	Wed Nov 28 11:54:43 2012 +0100
     9.3 @@ -91,6 +91,7 @@
     9.4    Arc e;
     9.5    VType c;
     9.6    bool b;
     9.7 +  ignore_unused_variable_warning(c,b);
     9.8    int i;
     9.9    CostMap cost;
    9.10    ArbMap arb;
    10.1 --- a/test/preflow_test.cc	Thu Sep 13 12:02:27 2012 +0200
    10.2 +++ b/test/preflow_test.cc	Wed Nov 28 11:54:43 2012 +0100
    10.3 @@ -86,6 +86,7 @@
    10.4    CutMap cut;
    10.5    VType v;
    10.6    bool b;
    10.7 +  ignore_unused_variable_warning(v,b);
    10.8  
    10.9    typedef Preflow<Digraph, CapMap>
   10.10              ::SetFlowMap<FlowMap>
    11.1 --- a/test/suurballe_test.cc	Thu Sep 13 12:02:27 2012 +0200
    11.2 +++ b/test/suurballe_test.cc	Wed Nov 28 11:54:43 2012 +0100
    11.3 @@ -117,6 +117,8 @@
    11.4  
    11.5    int f;
    11.6    VType c;
    11.7 +  ignore_unused_variable_warning(f,c);
    11.8 +
    11.9    c = const_suurb_test.totalLength();
   11.10    f = const_suurb_test.flow(e);
   11.11    const SuurballeType::FlowMap& fm =
    12.1 --- a/tools/dimacs-solver.cc	Thu Sep 13 12:02:27 2012 +0200
    12.2 +++ b/tools/dimacs-solver.cc	Wed Nov 28 11:54:43 2012 +0100
    12.3 @@ -117,16 +117,17 @@
    12.4    }
    12.5    if (report) std::cerr << "Read the file: " << ti << '\n';
    12.6  
    12.7 +  typedef NetworkSimplex<Digraph, Value> MCF;
    12.8    ti.restart();
    12.9 -  NetworkSimplex<Digraph, Value> ns(g);
   12.10 +  MCF ns(g);
   12.11    ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup);
   12.12    if (sum_sup > 0) ns.supplyType(ns.LEQ);
   12.13    if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n';
   12.14    ti.restart();
   12.15 -  bool res = ns.run();
   12.16 +  typename MCF::ProblemType res = ns.run();
   12.17    if (report) {
   12.18      std::cerr << "Run NetworkSimplex: " << ti << "\n\n";
   12.19 -    std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n';
   12.20 +    std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n';
   12.21      if (res) std::cerr << "Min flow cost: "
   12.22                         << ns.template totalCost<LargeValue>() << '\n';
   12.23    }
   12.24 @@ -187,9 +188,6 @@
   12.25  }
   12.26  
   12.27  int main(int argc, const char *argv[]) {
   12.28 -  typedef SmartDigraph Digraph;
   12.29 -
   12.30 -  typedef Digraph::Arc Arc;
   12.31  
   12.32    std::string inputName;
   12.33    std::string outputName;