From 73785832fd7df6a300985d1edf3a386b64e0ce19 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Mon, 4 Nov 2019 22:44:27 +0100 Subject: Epeck is now the default value. Epick and Epeck in doc. User warning on ctor if Epeck with CGAL < 5.X --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/Alpha_complex/include/gudhi/Alpha_complex.h') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 8919cdb9..0cb4accb 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -20,7 +20,8 @@ #include // isnan, fmax #include -#include +#include // For EXACT or SAFE version +#include // For FAST version #include #include // for CGAL::Identity_property_map #include @@ -39,17 +40,20 @@ // Make compilation fail - required for external projects - https://github.com/GUDHI/gudhi-devel/issues/10 #if CGAL_VERSION_NR < 1041101000 -# error Alpha_complex_3d is only available for CGAL >= 4.11 +# error Alpha_complex is only available for CGAL >= 4.11 #endif #if !EIGEN_VERSION_AT_LEAST(3,1,0) -# error Alpha_complex_3d is only available for Eigen3 >= 3.1.0 installed with CGAL +# error Alpha_complex is only available for Eigen3 >= 3.1.0 installed with CGAL #endif namespace Gudhi { namespace alpha_complex { +template struct Is_Epick_D { static const bool value = false; }; +template struct Is_Epick_D> { static const bool value = true; }; + /** * \class Alpha_complex Alpha_complex.h gudhi/Alpha_complex.h * \brief Alpha complex data structure. @@ -63,17 +67,20 @@ namespace alpha_complex { * * Please refer to \ref alpha_complex for examples. * - * The complex is a template class requiring an Epick_d CGAL::Epeck_d, + * or an CGAL::Epick_d dD Geometry Kernel * \cite cgal:s-gkd-15b from CGAL as template, default value is CGAL::Epick_d + * href="https://doc.cgal.org/latest/Kernel_d/structCGAL_1_1Epeck__d.html">CGAL::Epeck_d * < * CGAL::Dynamic_dimension_tag > * * \remark When Alpha_complex is constructed with an infinite value of alpha, the complex is a Delaunay complex. * */ -template> +template> class Alpha_complex { public: // Add an int in TDS to save point index in the structure @@ -184,6 +191,12 @@ class Alpha_complex { private: template void init_from_range(const InputPointRange& points) { + #if CGAL_VERSION_NR < 1050000000 + if (Is_Epick_D::value) + std::cerr << "It is strongly advised to use a CGAL version from 5.0 for performance reasons." + << "Your CGAL version is " << CGAL_VERSION << std::endl; + #endif + auto first = std::begin(points); auto last = std::end(points); -- cgit v1.2.3