diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-04-22 14:40:21 +0200 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-04-22 14:40:21 +0200 |
commit | f2e139123b15fee6e1512aac3824dd6664561cdb (patch) | |
tree | 1f0a7b458a461a75c9f7fe3c43ee6980adf10335 /src/python/include/Simplex_tree_interface.h | |
parent | 17dc48527dcc8ee7e5eab95f9fdde3e236f4ad47 (diff) | |
parent | 5857c571388a4349934a266ca187b2c2ac10818c (diff) |
Merge branch 'master' into simplex_tree_extended_persistence_enhancement
Diffstat (limited to 'src/python/include/Simplex_tree_interface.h')
-rw-r--r-- | src/python/include/Simplex_tree_interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/python/include/Simplex_tree_interface.h b/src/python/include/Simplex_tree_interface.h index dc9d01d7..aec29f9b 100644 --- a/src/python/include/Simplex_tree_interface.h +++ b/src/python/include/Simplex_tree_interface.h @@ -42,6 +42,7 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { using Complex_simplex_iterator = typename Base::Complex_simplex_iterator; using Extended_filtration_data = typename Base::Extended_filtration_data; using Boundary_simplex_iterator = typename Base::Boundary_simplex_iterator; + typedef bool (*blocker_func_t)(Simplex simplex, void *user_data); public: @@ -165,6 +166,13 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { #endif } + void expansion_with_blockers_callback(int dimension, blocker_func_t user_func, void *user_data) { + Base::expansion_with_blockers(dimension, [&](Simplex_handle sh){ + Simplex simplex(Base::simplex_vertex_range(sh).begin(), Base::simplex_vertex_range(sh).end()); + return user_func(simplex, user_data); + }); + } + // Iterator over the simplex tree Complex_simplex_iterator get_simplices_iterator_begin() { // this specific case works because the range is just a pair of iterators - won't work if range was a vector |