cout << "}" << endl;
}
-
-void dot_print(int nb_vertices,
- int nb_edges, int *ea, int *eb, scalar_t *el,
- int _source, int _sink,
- int *edge_occupation) {
- for(int e = 0; e < nb_edges; e++) {
- }
- cout << "}" << endl;
-}
MTPGraph::MTPGraph(int nb_vertices, int nb_edges,
int *from, int *to,
int src, int snk) {
edges = new Edge[_nb_edges];
vertices = new Vertex[_nb_vertices];
+ _front = new Vertex *[_nb_vertices];
+ _new_front = new Vertex *[_nb_vertices];
_source = &vertices[src];
_sink = &vertices[snk];
edges[e].terminal_vertex = &vertices[to[e]];
}
- _front = new Vertex *[_nb_vertices];
- _new_front = new Vertex *[_nb_vertices];
}
MTPGraph::~MTPGraph() {
}
}
-void MTPGraph::update_work_length() {
+void MTPGraph::update_work_lengths() {
for(int n = 0; n < _nb_vertices; n++) {
scalar_t d = vertices[n].distance_from_source;
for(Edge *e = vertices[n].root_edge; e; e = e->next) {
do {
total_length = 0.0;
find_shortest_path(_front, _new_front);
- update_work_length();
+ update_work_lengths();
// Do we reach the _sink?
if(_sink->pred_edge) {