positivized_length = - positivized_length;
origin_vertex->del_leaving_edge(this);
terminal_vertex->add_leaving_edge(this);
- Vertex *t = terminal_vertex;
- terminal_vertex = origin_vertex;
- origin_vertex = t;
+ swap(terminal_vertex, origin_vertex);
}
//////////////////////////////////////////////////////////////////////
// Set the distance_from_source fields to the number of DP
// iterations needed to update it. Abort if the graph is not a DAG.
- int compute_dp_distances();
+ int compute_dp_ranks();
int _nb_vertices, _nb_edges;
Vertex *_source, *_sink;