diff options
Diffstat (limited to 'src/Alpha_complex/include/gudhi')
-rw-r--r-- | src/Alpha_complex/include/gudhi/Alpha_complex.h | 3 | ||||
-rw-r--r-- | src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 43 |
2 files changed, 16 insertions, 30 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 08db14fb..53216e2f 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -240,6 +240,9 @@ class Alpha_complex { * * @return true if creation succeeds, false otherwise. * + * @note Setting the max_alpha_square with a smaller value will not accelerate the complex creation. On the contrary + * it will launch SimplicialComplexForAlpha::prune_above_filtration after the complete creation. + * * @pre Delaunay triangulation must be already constructed with dimension strictly greater than 0. * @pre The simplicial complex must be empty (no vertices) * diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index 00a47d5c..9c9bc929 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -26,10 +26,6 @@ #include <boost/version.hpp> #include <boost/variant.hpp> -#if BOOST_VERSION >= 105400 -#include <boost/container/static_vector.hpp> -#endif - #include <gudhi/Debug_utils.h> #include <gudhi/Alpha_complex_options.h> @@ -50,6 +46,8 @@ #include <CGAL/iterator.h> #include <CGAL/version.h> +#include <boost/container/static_vector.hpp> + #include <iostream> #include <vector> #include <unordered_map> @@ -116,17 +114,8 @@ struct Value_from_iterator<complexity::SAFE, false> { } }; -template <> -struct Value_from_iterator<complexity::EXACT, true> { - template <typename Iterator> - static double perform(Iterator it) { - // In EXACT mode, we are with Epeck or Epick with EXACT value set to CGAL::Tag_true. - return CGAL::to_double(it->exact()); - } -}; - -template <> -struct Value_from_iterator<complexity::EXACT, false> { +template<bool Weighted_or_periodic> +struct Value_from_iterator<complexity::EXACT,Weighted_or_periodic>{ template <typename Iterator> static double perform(Iterator it) { // In EXACT mode, we are with Epeck or Epick with EXACT value set to CGAL::Tag_true. @@ -145,8 +134,8 @@ struct Value_from_iterator<complexity::EXACT, false> { * Shapes</a> from a range of points (can be read from an OFF file, cf. Points_off_reader). * Duplicate points are inserted once in the Alpha_complex. This is the reason why the vertices may be not contiguous. * - * \tparam Complexity shall be `Gudhi::alpha_complex::complexity`. Default value is - * `Gudhi::alpha_complex::complexity::FAST`. + * \tparam Complexity shall be `Gudhi::alpha_complex::complexity` type. Default value is + * `Gudhi::alpha_complex::complexity::SAFE`. * * \tparam Weighted Boolean used to set/unset the weighted version of Alpha_complex_3d. Default value is false. * @@ -169,7 +158,7 @@ struct Value_from_iterator<complexity::EXACT, false> { * 3d Delaunay complex. * */ -template <complexity Complexity = complexity::FAST, bool Weighted = false, bool Periodic = false> +template <complexity Complexity = complexity::SAFE, bool Weighted = false, bool Periodic = false> class Alpha_complex_3d { // Epick = Exact_predicates_inexact_constructions_kernel // Epeck = Exact_predicates_exact_constructions_kernel @@ -192,14 +181,11 @@ class Alpha_complex_3d { template <typename Predicates, bool Weighted_version, bool Periodic_version> struct Kernel_3 {}; - template <typename Predicates> - struct Kernel_3<Predicates, false, false> { - using Kernel = Predicates; - }; - template <typename Predicates> - struct Kernel_3<Predicates, true, false> { + template <typename Predicates, bool Is_periodic> + struct Kernel_3<Predicates, Is_periodic, false> { using Kernel = Predicates; }; + template <typename Predicates> struct Kernel_3<Predicates, false, true> { using Kernel = CGAL::Periodic_3_Delaunay_triangulation_traits_3<Predicates>; @@ -269,11 +255,7 @@ class Alpha_complex_3d { using Facet = typename Alpha_shape_3::Facet; using Edge = typename Alpha_shape_3::Edge; using Alpha_vertex_handle = typename Alpha_shape_3::Vertex_handle; -#if BOOST_VERSION >= 105400 using Vertex_list = boost::container::static_vector<Alpha_vertex_handle, 4>; -#else - using Vertex_list = std::vector<Alpha_vertex_handle>; -#endif public: /** \brief Alpha_complex constructor from a list of points. @@ -455,9 +437,10 @@ class Alpha_complex_3d { * * @return true if creation succeeds, false otherwise. * - * @pre The simplicial complex must be empty (no vertices) + * @note Setting the max_alpha_square with a smaller value will not accelerate the complex creation. On the contrary + * it will launch SimplicialComplexForAlpha3d::prune_above_filtration after the complete creation. * - * Initialization can be launched once. + * @pre The simplicial complex must be empty (no vertices). * */ template <typename SimplicialComplexForAlpha3d, |