8void ttk::PersistentGenerators::getConnectedComponents(
9 const std::vector<std::array<SimplexId, 2>> &edgeNeighs,
10 std::vector<SimplexId> &connComp)
const {
13 std::vector<ttk::UnionFind> uf(connComp.size());
16 for(
size_t j = 0; j < edgeNeighs.size(); ++j) {
21 for(
size_t j = 0; j < edgeNeighs.size(); ++j) {
27 std::vector<SimplexId> connCompIds(edgeNeighs.size(), -1);
31 for(
size_t j = 0; j < edgeNeighs.size(); ++j) {
32 const auto root{uf[j].find()};
34 const auto rank{root->getRank()};
35 if(connCompIds[rank] == -1) {
36 connCompIds[rank] = nConnComps++;
38 connComp[j] = connCompIds[rank];
void setDebugMsgPrefix(const std::string &prefix)
static UnionFind * makeUnion(UnionFind *uf0, UnionFind *uf1)