diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2021-07-23 12:39:36 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2022-02-18 21:49:25 +0100 |
commit | 5f13e46e0b35f602e248d300f510ef72f8101d5c (patch) | |
tree | 0434051bc52bb497d87408036723a9f331cfbf5c | |
parent | 596da884cff7dca1d54af0e1ddc63ff34a6f1355 (diff) |
comment
-rw-r--r-- | src/Collapse/include/gudhi/Flag_complex_edge_collapser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h index c8a1f763..b3dd9b32 100644 --- a/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h +++ b/src/Collapse/include/gudhi/Flag_complex_edge_collapser.h @@ -404,9 +404,10 @@ struct Flag_complex_edge_collapser2 { template<class Ngb> bool is_dominated_by(Ngb const& e_ngb, Vertex c, Filtration_value f){ Ngb_list const&nc = neighbors[c]; - // if few neighbors, use dichotomy? - // try a gallop strategy? a bitset? + // The best strategy probably depends on the distribution, how sparse / dense the adjacency matrix is, how (un)balanced the sizes of e_ngb and nc are. + // Some efficient operations on sets work best with bitsets, although the need for a map complicates things. #if 0 + // if few neighbors, use dichotomy? Seems slower. auto ci = nc.begin(); auto ce = nc.end(); for(auto v : e_ngb) { @@ -435,6 +436,7 @@ struct Flag_complex_edge_collapser2 { Vertex ve = *eni; Vertex vc = ci->first; while(ve > vc) { + // try a gallop strategy (exponential search)? Seems slower if(++ci == ce) return false; vc = ci->first; } |