projects
/
mtp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
602e16c
)
Update.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 21 Aug 2012 22:29:53 +0000
(15:29 -0700)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 21 Aug 2012 22:29:53 +0000
(15:29 -0700)
mtp.cc
patch
|
blob
|
history
diff --git
a/mtp.cc
b/mtp.cc
index
88e6557
..
9fa61aa
100644
(file)
--- a/
mtp.cc
+++ b/
mtp.cc
@@
-168,24
+168,20
@@
void Graph::find_shortest_path(Vertex **front, Vertex **new_front) {
scalar_t d;
#ifdef VERBOSE
scalar_t d;
#ifdef VERBOSE
- cout << "find_shortest_path" << endl;
-#endif
-
-#ifdef DEBUG
scalar_t residual_error = 0.0;
#endif
for(int n = 0; n < nb_vertices; n++) {
for(Edge *e = vertices[n].root_edge; e; e = e->next) {
if(e->work_length < 0) {
scalar_t residual_error = 0.0;
#endif
for(int n = 0; n < nb_vertices; n++) {
for(Edge *e = vertices[n].root_edge; e; e = e->next) {
if(e->work_length < 0) {
-#ifdef
DEBUG
+#ifdef
VERBOSE
residual_error -= e->work_length;
#endif
e->work_length = 0.0;
}
}
}
residual_error -= e->work_length;
#endif
e->work_length = 0.0;
}
}
}
-#ifdef
DEBUG
- cout << "
DEBUG
residual_error " << residual_error << endl;
+#ifdef
VERBOSE
+ cout << "residual_error " << residual_error << endl;
#endif
for(int v = 0; v < nb_vertices; v++) {
#endif
for(int v = 0; v < nb_vertices; v++) {
@@
-336,10
+332,10
@@
int main(int argc, char **argv) {
source, sink,
result_edge_occupation);
source, sink,
result_edge_occupation);
-
//
dot_print(nb_vertices, nb_edges,
-
//
vertex_from, vertex_to, edge_lengths,
-
//
source, sink,
-
//
result_edge_occupation);
+ dot_print(nb_vertices, nb_edges,
+ vertex_from, vertex_to, edge_lengths,
+ source, sink,
+ result_edge_occupation);
delete[] result_edge_occupation;
delete[] edge_lengths;
delete[] result_edge_occupation;
delete[] edge_lengths;