diff --git a/algorithms/tiny_components.hpp b/algorithms/tiny_components.hpp index b9f2f7743..6821bcd8b 100644 --- a/algorithms/tiny_components.hpp +++ b/algorithms/tiny_components.hpp @@ -241,6 +241,11 @@ class TarjanSCC { return component_size_vector[components_index[node]]; } + + unsigned get_component_id(const NodeID node) const + { + return components_index[node]; + } }; #endif /* TINY_COMPONENTS_HPP */