add aux. function to get component id for a given node

This commit is contained in:
Dennis Luxen 2014-12-23 15:17:38 +01:00
parent f42cc848d5
commit 09d0ac3838

View File

@ -241,6 +241,11 @@ class TarjanSCC
{ {
return component_size_vector[components_index[node]]; return component_size_vector[components_index[node]];
} }
unsigned get_component_id(const NodeID node) const
{
return components_index[node];
}
}; };
#endif /* TINY_COMPONENTS_HPP */ #endif /* TINY_COMPONENTS_HPP */