summaryrefslogtreecommitdiff
path: root/src/python/include
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2022-05-17 09:18:18 +0200
committerMarc Glisse <marc.glisse@inria.fr>2022-05-17 09:18:18 +0200
commite45fd615787821c40446f68b576e9e4ff8cb1a27 (patch)
treeaab80cd4a82f1a9b760e1114b9a3fdbf11a8da77 /src/python/include
parente495c4de49a9a226359fbf21966f4ebc4b3fc31b (diff)
parent91a95c2709d293c31e5dc64fd4f1b8d370513605 (diff)
Merge remote-tracking branch 'origin/master' into collapse-pr2
Diffstat (limited to 'src/python/include')
-rw-r--r--src/python/include/Alpha_complex_interface.h10
-rw-r--r--src/python/include/Simplex_tree_interface.h8
2 files changed, 18 insertions, 0 deletions
diff --git a/src/python/include/Alpha_complex_interface.h b/src/python/include/Alpha_complex_interface.h
index 671af4a4..469b91ce 100644
--- a/src/python/include/Alpha_complex_interface.h
+++ b/src/python/include/Alpha_complex_interface.h
@@ -57,6 +57,16 @@ class Alpha_complex_interface {
alpha_ptr_->create_simplex_tree(simplex_tree, max_alpha_square, default_filtration_value);
}
+ static void set_float_relative_precision(double precision) {
+ // cf. Exact_alpha_complex_dD kernel type in Alpha_complex_factory.h
+ CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>::FT::set_relative_precision_of_to_double(precision);
+ }
+
+ static double get_float_relative_precision() {
+ // cf. Exact_alpha_complex_dD kernel type in Alpha_complex_factory.h
+ return CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>::FT::get_relative_precision_of_to_double();
+ }
+
private:
std::unique_ptr<Abstract_alpha_complex> alpha_ptr_;
};
diff --git a/src/python/include/Simplex_tree_interface.h b/src/python/include/Simplex_tree_interface.h
index 4d8f8537..7f9b0067 100644
--- a/src/python/include/Simplex_tree_interface.h
+++ b/src/python/include/Simplex_tree_interface.h
@@ -40,6 +40,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:
@@ -189,6 +190,13 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> {
return collapsed_stree_ptr;
}
+ 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