# HG changeset patch # User Alpar Juttner # Date 1354100083 -3600 # Node ID d216e1c8b3fa235855ea6307b68e6bef52aeb001 # Parent 00f8d9f9920dc88cb0b570a6bb2a7fcfeebee715# Parent 7e368d9b67f7838f2ba2a4e92931779023cbb685 Merge #453 to branches >=1.2 diff -r 00f8d9f9920d -r d216e1c8b3fa lemon/concepts/graph_components.h --- a/lemon/concepts/graph_components.h Thu Sep 13 12:02:27 2012 +0200 +++ b/lemon/concepts/graph_components.h Wed Nov 28 11:54:43 2012 +0100 @@ -108,6 +108,8 @@ i1 = i2 = i3; bool b; + ignore_unused_variable_warning(b); + b = (ia == ib) && (ia != ib); b = (ia == INVALID) && (ib != INVALID); b = (ia < ib); diff -r 00f8d9f9920d -r d216e1c8b3fa test/bfs_test.cc --- a/test/bfs_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/bfs_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -61,6 +61,7 @@ Node s, t, n; Arc e; int l, i; + ignore_unused_variable_warning(l,i); bool b; BType::DistMap d(G); BType::PredMap p(G); @@ -150,6 +151,8 @@ Digraph g; bool b; + ignore_unused_variable_warning(b); + bfs(g).run(Node()); b=bfs(g).run(Node(),Node()); bfs(g).run(); diff -r 00f8d9f9920d -r d216e1c8b3fa test/circulation_test.cc --- a/test/circulation_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/circulation_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -73,6 +73,7 @@ BarrierMap bar; VType v; bool b; + ignore_unused_variable_warning(v,b); typedef Circulation ::SetFlowMap diff -r 00f8d9f9920d -r d216e1c8b3fa test/dfs_test.cc --- a/test/dfs_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/dfs_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -67,6 +67,8 @@ Arc e; int l, i; bool b; + ignore_unused_variable_warning(l,i,b); + DType::DistMap d(G); DType::PredMap p(G); Path pp; @@ -151,6 +153,8 @@ Digraph g; bool b; + ignore_unused_variable_warning(b); + dfs(g).run(Node()); b=dfs(g).run(Node(),Node()); dfs(g).run(); diff -r 00f8d9f9920d -r d216e1c8b3fa test/dijkstra_test.cc --- a/test/dijkstra_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/dijkstra_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -65,6 +65,8 @@ VType l; int i; bool b; + ignore_unused_variable_warning(l,i,b); + DType::DistMap d(G); DType::PredMap p(G); LengthMap length; @@ -162,6 +164,8 @@ Digraph g; bool b; + ignore_unused_variable_warning(b); + dijkstra(g,LengthMap()).run(Node()); b=dijkstra(g,LengthMap()).run(Node(),Node()); dijkstra(g,LengthMap()) diff -r 00f8d9f9920d -r d216e1c8b3fa test/gomory_hu_test.cc --- a/test/gomory_hu_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/gomory_hu_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -68,6 +68,7 @@ CutMap cut; Value v; int d; + ignore_unused_variable_warning(v,d); GomoryHu gh_test(g, cap); const GomoryHu& diff -r 00f8d9f9920d -r d216e1c8b3fa test/hao_orlin_test.cc --- a/test/hao_orlin_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/hao_orlin_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -66,6 +66,7 @@ CapMap cap; CutMap cut; Value v; + ignore_unused_variable_warning(v); HaoOrlin ho_test(g, cap); const HaoOrlin& diff -r 00f8d9f9920d -r d216e1c8b3fa test/matching_test.cc --- a/test/matching_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/matching_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -145,6 +145,7 @@ MaxMatching::Status stat = const_mat_test.status(n); + ignore_unused_variable_warning(stat); const MaxMatching::StatusMap& smap = const_mat_test.statusMap(); stat = smap[n]; diff -r 00f8d9f9920d -r d216e1c8b3fa test/min_cost_arborescence_test.cc --- a/test/min_cost_arborescence_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/min_cost_arborescence_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -91,6 +91,7 @@ Arc e; VType c; bool b; + ignore_unused_variable_warning(c,b); int i; CostMap cost; ArbMap arb; diff -r 00f8d9f9920d -r d216e1c8b3fa test/preflow_test.cc --- a/test/preflow_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/preflow_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -86,6 +86,7 @@ CutMap cut; VType v; bool b; + ignore_unused_variable_warning(v,b); typedef Preflow ::SetFlowMap diff -r 00f8d9f9920d -r d216e1c8b3fa test/suurballe_test.cc --- a/test/suurballe_test.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/test/suurballe_test.cc Wed Nov 28 11:54:43 2012 +0100 @@ -117,6 +117,8 @@ int f; VType c; + ignore_unused_variable_warning(f,c); + c = const_suurb_test.totalLength(); f = const_suurb_test.flow(e); const SuurballeType::FlowMap& fm = diff -r 00f8d9f9920d -r d216e1c8b3fa tools/dimacs-solver.cc --- a/tools/dimacs-solver.cc Thu Sep 13 12:02:27 2012 +0200 +++ b/tools/dimacs-solver.cc Wed Nov 28 11:54:43 2012 +0100 @@ -117,16 +117,17 @@ } if (report) std::cerr << "Read the file: " << ti << '\n'; + typedef NetworkSimplex MCF; ti.restart(); - NetworkSimplex ns(g); + MCF ns(g); ns.lowerMap(lower).upperMap(cap).costMap(cost).supplyMap(sup); if (sum_sup > 0) ns.supplyType(ns.LEQ); if (report) std::cerr << "Setup NetworkSimplex class: " << ti << '\n'; ti.restart(); - bool res = ns.run(); + typename MCF::ProblemType res = ns.run(); if (report) { std::cerr << "Run NetworkSimplex: " << ti << "\n\n"; - std::cerr << "Feasible flow: " << (res ? "found" : "not found") << '\n'; + std::cerr << "Feasible flow: " << (res == MCF::OPTIMAL ? "found" : "not found") << '\n'; if (res) std::cerr << "Min flow cost: " << ns.template totalCost() << '\n'; } @@ -187,9 +188,6 @@ } int main(int argc, const char *argv[]) { - typedef SmartDigraph Digraph; - - typedef Digraph::Arc Arc; std::string inputName; std::string outputName;