Esempio n. 1
0
void Cluster::recPathToCluster(RootCluster *rootCluster, Clusters currentPath)
{
    // Reset cluster-cluster overlap exceptions.
    m_cluster_cluster_overlap_exceptions.clear();
    m_nodes_replaced_with_clusters.clear();
    m_overlap_replacement_map.clear();

    // Add this cluster to the path.
    currentPath.push_back(this);

    // Recusively all on each child cluster.
    for (unsigned i = 0; i < clusters.size(); ++i) 
    {
        clusters[i]->recPathToCluster(rootCluster, currentPath);
    }

    // And store the path to each child node.
    for (std::set<unsigned>::iterator it = nodes.begin();
            it != nodes.end(); ++it)
    {
        rootCluster->m_cluster_vectors_leading_to_nodes[*it].
                push_back(currentPath);
    }
}