refactor and improve the round trip computation of multiple SCCs

Problem:
- old solution was slow
- depending on the result of TarjanSCC, new distance tables and new phantom node vectors were created to run tsp on it

Solution:
- dont create new distance tables and phantom node vectors
- pass an additional vector with the information which locations are in the same component and ignore all others

fix bug for scc split computation
This commit is contained in:
Chau Nguyen
2015-07-05 00:15:55 +02:00
committed by Huyen Chau Nguyen
parent 84c12793e8
commit b15f8f68e4
10 changed files with 634 additions and 287 deletions
+5
View File
@@ -201,6 +201,11 @@ template <typename GraphT> class TarjanSCC
return component_size_vector[component_id];
}
unsigned get_component_size_by_id(const unsigned component_id) const
{
return component_size_vector[component_id];
}
unsigned get_component_id(const NodeID node) const { return components_index[node]; }
};