diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2021-04-07 16:47:34 +0200 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2021-04-07 16:47:34 +0200 |
commit | d79ef2f79c33d8e8b8fd88e16f30e16433ab6644 (patch) | |
tree | 3f7642c750a71883361bdef85975d5c43c5f882d /src/python/include/Alpha_complex_interface.h | |
parent | e4381a3e2ad79d3150cd03704bef3fc006e7c54b (diff) |
alpha complex python module requires cgal 5.1 for weighted version. Alpha complex factory does not require a weighted specific version for alpha complex dD
Diffstat (limited to 'src/python/include/Alpha_complex_interface.h')
-rw-r--r-- | src/python/include/Alpha_complex_interface.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/python/include/Alpha_complex_interface.h b/src/python/include/Alpha_complex_interface.h index 31a8147b..ed243f19 100644 --- a/src/python/include/Alpha_complex_interface.h +++ b/src/python/include/Alpha_complex_interface.h @@ -31,17 +31,18 @@ class Alpha_complex_interface { const std::vector<double>& weights, bool fast_version, bool exact_version) : empty_point_set_(points.size() == 0) { + const bool weighted = (weights.size() > 0); if (fast_version) { - if (weights.size() == 0) { - alpha_ptr_ = std::make_unique<Inexact_alpha_complex_dD>(points, exact_version); + if (weighted) { + alpha_ptr_ = std::make_unique<Inexact_alpha_complex_dD<true>>(points, weights, exact_version); } else { - alpha_ptr_ = std::make_unique<Inexact_weighted_alpha_complex_dD>(points, weights, exact_version); + alpha_ptr_ = std::make_unique<Inexact_alpha_complex_dD<false>>(points, exact_version); } } else { - if (weights.size() == 0) { - alpha_ptr_ = std::make_unique<Exact_alpha_complex_dD>(points, exact_version); + if (weighted) { + alpha_ptr_ = std::make_unique<Exact_alpha_complex_dD<true>>(points, weights, exact_version); } else { - alpha_ptr_ = std::make_unique<Exact_weighted_alpha_complex_dD>(points, weights, exact_version); + alpha_ptr_ = std::make_unique<Exact_alpha_complex_dD<false>>(points, exact_version); } } } |