+
+ for(int n = 0; n < nb_vertices; n++) {
+ Vertex *v = &vertices[n];
+ for(Edge *e = v->root_edge; e; e = e->next) {
+ result_edge_occupation[e->id] = e->occupied;
+ }
+ }
+}
+
+void find_best_paths(int nb_vertices,
+ int nb_edges, int *ea, int *eb, scalar_t *el,
+ int source, int sink,
+ int *result_edge_occupation) {
+ Graph graph(nb_vertices, nb_edges, ea, eb, el, source, sink);
+ graph.find_best_paths(result_edge_occupation);
+}
+
+void dot_print(int nb_vertices,
+ int nb_edges, int *ea, int *eb, scalar_t *el,
+ int source, int sink,
+ int *edge_occupation) {
+ cout << "digraph {" << endl;
+ cout << " node[shape=circle];" << endl;
+ for(int e = 0; e < nb_edges; e++) {
+ if(edge_occupation[e]) {
+ cout << " " << ea[e] << " -> " << eb[e] << " [style=bold,color=black,label=\"" << el[e] << "\"];" << endl;
+ } else {
+ cout << " " << ea[e] << " -> " << eb[e] << " [color=gray,label=\"" << el[e] << "\"];" << endl;
+ }
+ }
+ cout << "}" << endl;