[Lemon-commits] Alpar Juttner: Merge #453 to branches >=1.2
Lemon HG
hg at lemon.cs.elte.hu
Wed Nov 28 12:10:21 CET 2012
details: http://lemon.cs.elte.hu/hg/lemon/rev/d216e1c8b3fa
changeset: 1173:d216e1c8b3fa
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Wed Nov 28 11:54:43 2012 +0100
description:
Merge #453 to branches >=1.2
diffstat:
lemon/concepts/graph_components.h | 2 ++
test/bfs_test.cc | 3 +++
test/circulation_test.cc | 1 +
test/dfs_test.cc | 4 ++++
test/dijkstra_test.cc | 4 ++++
test/gomory_hu_test.cc | 1 +
test/hao_orlin_test.cc | 1 +
test/matching_test.cc | 1 +
test/min_cost_arborescence_test.cc | 1 +
test/preflow_test.cc | 1 +
test/suurballe_test.cc | 2 ++
tools/dimacs-solver.cc | 10 ++++------
12 files changed, 25 insertions(+), 6 deletions(-)
diffs (186 lines):
diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h
--- a/lemon/concepts/graph_components.h
+++ b/lemon/concepts/graph_components.h
@@ -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 --git a/test/bfs_test.cc b/test/bfs_test.cc
--- a/test/bfs_test.cc
+++ b/test/bfs_test.cc
@@ -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 --git a/test/circulation_test.cc b/test/circulation_test.cc
--- a/test/circulation_test.cc
+++ b/test/circulation_test.cc
@@ -73,6 +73,7 @@
BarrierMap bar;
VType v;
bool b;
+ ignore_unused_variable_warning(v,b);
typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
::SetFlowMap<FlowMap>
diff --git a/test/dfs_test.cc b/test/dfs_test.cc
--- a/test/dfs_test.cc
+++ b/test/dfs_test.cc
@@ -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<Digraph> 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 --git a/test/dijkstra_test.cc b/test/dijkstra_test.cc
--- a/test/dijkstra_test.cc
+++ b/test/dijkstra_test.cc
@@ -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 --git a/test/gomory_hu_test.cc b/test/gomory_hu_test.cc
--- a/test/gomory_hu_test.cc
+++ b/test/gomory_hu_test.cc
@@ -68,6 +68,7 @@
CutMap cut;
Value v;
int d;
+ ignore_unused_variable_warning(v,d);
GomoryHu<Graph, CapMap> gh_test(g, cap);
const GomoryHu<Graph, CapMap>&
diff --git a/test/hao_orlin_test.cc b/test/hao_orlin_test.cc
--- a/test/hao_orlin_test.cc
+++ b/test/hao_orlin_test.cc
@@ -66,6 +66,7 @@
CapMap cap;
CutMap cut;
Value v;
+ ignore_unused_variable_warning(v);
HaoOrlin<Digraph, CapMap> ho_test(g, cap);
const HaoOrlin<Digraph, CapMap>&
diff --git a/test/matching_test.cc b/test/matching_test.cc
--- a/test/matching_test.cc
+++ b/test/matching_test.cc
@@ -145,6 +145,7 @@
MaxMatching<Graph>::Status stat =
const_mat_test.status(n);
+ ignore_unused_variable_warning(stat);
const MaxMatching<Graph>::StatusMap& smap =
const_mat_test.statusMap();
stat = smap[n];
diff --git a/test/min_cost_arborescence_test.cc b/test/min_cost_arborescence_test.cc
--- a/test/min_cost_arborescence_test.cc
+++ b/test/min_cost_arborescence_test.cc
@@ -91,6 +91,7 @@
Arc e;
VType c;
bool b;
+ ignore_unused_variable_warning(c,b);
int i;
CostMap cost;
ArbMap arb;
diff --git a/test/preflow_test.cc b/test/preflow_test.cc
--- a/test/preflow_test.cc
+++ b/test/preflow_test.cc
@@ -86,6 +86,7 @@
CutMap cut;
VType v;
bool b;
+ ignore_unused_variable_warning(v,b);
typedef Preflow<Digraph, CapMap>
::SetFlowMap<FlowMap>
diff --git a/test/suurballe_test.cc b/test/suurballe_test.cc
--- a/test/suurballe_test.cc
+++ b/test/suurballe_test.cc
@@ -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 --git a/tools/dimacs-solver.cc b/tools/dimacs-solver.cc
--- a/tools/dimacs-solver.cc
+++ b/tools/dimacs-solver.cc
@@ -117,16 +117,17 @@
}
if (report) std::cerr << "Read the file: " << ti << '\n';
+ typedef NetworkSimplex<Digraph, Value> MCF;
ti.restart();
- NetworkSimplex<Digraph, Value> 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<LargeValue>() << '\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;
More information about the Lemon-commits
mailing list