add aux. function to get component id for a given node
This commit is contained in:
parent
f42cc848d5
commit
09d0ac3838
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user