From: Francois Fleuret Date: Thu, 20 Dec 2012 07:47:38 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=276df8ea8b9761cc729048d8e5c42670debc5825;p=mtp.git Cosmetics. --- diff --git a/mtp_graph.cc b/mtp_graph.cc index 343ebf7..2832e71 100644 --- a/mtp_graph.cc +++ b/mtp_graph.cc @@ -63,9 +63,7 @@ void Edge::invert() { 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); } ////////////////////////////////////////////////////////////////////// diff --git a/mtp_graph.h b/mtp_graph.h index 1bfbe0c..883a67f 100644 --- a/mtp_graph.h +++ b/mtp_graph.h @@ -65,7 +65,7 @@ class MTPGraph { // 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;