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:
committed by
Huyen Chau Nguyen
parent
84c12793e8
commit
b15f8f68e4
@@ -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]; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user