Exemple #1
0
 /// Return the number of connected set in the UnionFind structure (tree forest)
 size_t NbTracks() const
 {
   std::set<unsigned int> parent_id(uf_tree.m_cc_parent.begin(), uf_tree.m_cc_parent.end());
   // Erase the "special marker" that depicted rejected tracks
   parent_id.erase(std::numeric_limits<unsigned int>::max());
   return parent_id.size();
 }
Exemple #2
0
Rcpp::List Commit::parent_id_list()
{
    BEGIN_RCPP
    Rcpp::List v;
    unsigned int c = parent_count();
    for (int i=0; i<c; ++i) {
        v.push_back(parent_id(i));
    }
    return v;
    END_RCPP
}