// EXAMPLE: ./mtp ./graph2.txt | dot -T pdf -o- | xpdf -
-// #define VERBOSE
+#define VERBOSE
#include <iostream>
#include <fstream>
Vertex *v, *tv;
scalar_t d;
-#ifdef DEBUG
+#ifdef VERBOSE
+ 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) {
- cerr << "DEBUG error in find_shortest_path: Edge work lengths have to be positive."
- << endl;
- abort();
+#ifdef VERBOSE
+ residual_error -= e->work_length;
+#endif
+ e->work_length = 0.0;
}
}
}
+#ifdef VERBOSE
+ cout << "residual_error " << residual_error << endl;
#endif
for(int v = 0; v < nb_vertices; v++) {