summaryrefslogtreecommitdiff
path: root/src/python/include/Alpha_complex_interface.h
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-12-05 16:01:45 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-12-05 16:01:45 +0100
commit9fc45aafa4588b86ccd903b9173a8cdf48db68a1 (patch)
treecadafca9f37d6f11fae6f839ae3cd0d9aafbd31f /src/python/include/Alpha_complex_interface.h
parent7df0113ddf2892b0cccf025a836214021b301072 (diff)
Add MPFR dependency for python module. Use Epeck_d by default for Alpha complex. Add boolean exact version mechanism
Diffstat (limited to 'src/python/include/Alpha_complex_interface.h')
-rw-r--r--src/python/include/Alpha_complex_interface.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/python/include/Alpha_complex_interface.h b/src/python/include/Alpha_complex_interface.h
index 96353cc4..a7621f2b 100644
--- a/src/python/include/Alpha_complex_interface.h
+++ b/src/python/include/Alpha_complex_interface.h
@@ -13,6 +13,7 @@
#include <gudhi/Simplex_tree.h>
#include <gudhi/Alpha_complex.h>
+#include <CGAL/Epeck_d.h>
#include <CGAL/Epick_d.h>
#include <boost/range/adaptor/transformed.hpp>
@@ -28,7 +29,7 @@ namespace Gudhi {
namespace alpha_complex {
class Alpha_complex_interface {
- using Dynamic_kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >;
+ using Dynamic_kernel = CGAL::Epeck_d< CGAL::Dynamic_dimension_tag >;
using Point_d = Dynamic_kernel::Point_d;
public:
@@ -51,7 +52,7 @@ class Alpha_complex_interface {
std::vector<double> vd;
try {
Point_d const& ph = alpha_complex_->get_point(vh);
- for (auto coord = ph.cartesian_begin(); coord < ph.cartesian_end(); coord++)
+ for (auto coord = ph.cartesian_begin(); coord != ph.cartesian_end(); coord++)
vd.push_back(CGAL::to_double(*coord));
} catch (std::out_of_range const&) {
// std::out_of_range is thrown in case not found. Other exceptions must be re-thrown
@@ -59,8 +60,8 @@ class Alpha_complex_interface {
return vd;
}
- void create_simplex_tree(Simplex_tree_interface<>* simplex_tree, double max_alpha_square) {
- alpha_complex_->create_complex(*simplex_tree, max_alpha_square);
+ void create_simplex_tree(Simplex_tree_interface<>* simplex_tree, double max_alpha_square, bool exact_version) {
+ alpha_complex_->create_complex(*simplex_tree, max_alpha_square, exact_version);
simplex_tree->initialize_filtration();
}