summaryrefslogtreecommitdiff
path: root/src/python/include
diff options
context:
space:
mode:
authorMathieuCarriere <mathieu.carriere3@gmail.com>2022-04-03 20:30:14 +0200
committerMathieuCarriere <mathieu.carriere3@gmail.com>2022-04-03 20:30:14 +0200
commit6d9e3d393003ac2214426d5b796f560785a7fd3e (patch)
tree6e87645c26e5ce7ee4109eb5b512f3e84d31281a /src/python/include
parent6f4cc44210113e4c8a295aeeb75f61e1f2be2f02 (diff)
parentb066b4376abf66ddc76e61a6a815a409b05fe59b (diff)
Merge branch 'master' of https://github.com/GUDHI/gudhi-devel into diff
Diffstat (limited to 'src/python/include')
-rw-r--r--src/python/include/Simplex_tree_interface.h8
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 629f6083..aa3dac18 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:
@@ -195,6 +196,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