9 LogDebug(
"TICLGraph") << tabs <<
" Visiting node " <<
index_ << std::endl;
11 subComponent.push_back(
index_);
13 LogDebug(
"TICLGraph") << tabs <<
" Trying to visit " << neighbour << std::endl;
14 graph[neighbour].findSubComponents(graph, subComponent, tabs);
21 std::vector<std::vector<unsigned int>>
components;
22 for (
auto const& node :
nodes_) {
23 auto const id = node.getId();
27 std::vector<unsigned int> tmpSubComponents;
36 std::unordered_set<unsigned int>&
visited,
37 std::vector<unsigned int>& component)
const {
39 component.push_back(nodeIndex);
41 for (
auto const& neighbourIndex :
nodes_[nodeIndex].getOuterNeighbours()) {
49 std::unordered_set<unsigned int>
visited;
50 std::vector<std::vector<unsigned int>>
components;
52 for (
unsigned int i = 0;
i <
nodes_.size(); ++
i) {
54 std::vector<unsigned int> component;
std::vector< std::vector< unsigned int > > getConnectedComponents() const
std::vector< int > isRootNode_
std::vector< ticl::Node > nodes_
void dfsForCC(unsigned int nodeIndex, std::unordered_set< unsigned int > &visited, std::vector< unsigned int > &component) const
std::vector< unsigned int > outerNeighboursId_
std::vector< std::vector< unsigned int > > findSubComponents()
void findSubComponents(std::vector< Node > &graph, std::vector< unsigned int > &subComponent, std::string tabs)