From 09d0ac3838c6f305551783c446a12482a85c523c Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Tue, 23 Dec 2014 15:17:38 +0100 Subject: [PATCH] add aux. function to get component id for a given node --- algorithms/tiny_components.hpp | 5 +++++ 1 file changed, 5 insertions(+) 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 */