Initial commit.
[mtp.git] / miniksp.cc
index 0598afe..92e9de5 100644 (file)
@@ -20,7 +20,7 @@
 // END_IP_HEADER                                                         //
 ///////////////////////////////////////////////////////////////////////////
 
-#define VERBOSE
+// #define VERBOSE
 
 #include <iostream>
 #include <fstream>
@@ -68,8 +68,8 @@ void add_dpsi_es(int nb_edges, scalar_t *el, int *ea, int *eb, scalar_t *psi) {
   }
 }
 
-// Finds the shortest path in the graph and return in
-// result_edge_back, for each vertex the edge to follow back from it
+// Finds the shortest path in the graph and returns in
+// result_edge_back, for each vertex, the edge to follow back from it
 // to reach the source with the shortest path, and in result_dist the
 // distance to the source. The edge lengths have to be positive.
 void find_shortest(int nb_vertices,
@@ -105,8 +105,11 @@ void find_shortest(int nb_vertices,
 }
 
 // Iterates find_shortest as long as it finds paths of negative
-// lengths. Notes which edges are occupied by the superposition of
-// paths in result_edge_occupation
+// lengths. Returns which edges are occupied by the superposition of
+// paths in result_edge_occupation.
+//
+// **WARNING** this routine changes the values of el, ea, and eb
+// (i.e. the occupied edges are inverted).
 void find_best_paths(int nb_vertices,
                      int nb_edges, scalar_t *el, int *ea, int *eb,
                      int source, int sink,