diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-10-10 12:52:35 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-10-10 12:52:35 +0000 |
commit | fb7c3e76da15aca382ed7a6795d1a6fb3c1716c2 (patch) | |
tree | 6b7958a391c189192b26424246a9039c300e2053 /src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp | |
parent | f1e2834261bae80eb216bcd9317538e5de4375a9 (diff) |
Fix CGAL 4.11 bug and remove old_interface file. Better done with #if
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/weighted_alpha_complex_fix@2774 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 9a905b04cfa2718f9d5abc80e14ab1ee26d16279
Diffstat (limited to 'src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp')
-rw-r--r-- | src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp index 92fed4c1..85b0ab34 100644 --- a/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp +++ b/src/Persistent_cohomology/example/weighted_alpha_complex_3d_persistence.cpp @@ -26,11 +26,17 @@ #include <gudhi/Persistent_cohomology.h> #include <gudhi/Points_3D_off_io.h> +#include <CGAL/config.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Regular_triangulation_3.h> #include <CGAL/Alpha_shape_3.h> #include <CGAL/iterator.h> +// For CGAL < 4.11 +#if CGAL_VERSION_NR < 1041100000 +#include <CGAL/Regular_triangulation_euclidean_traits_3.h> +#endif // CGAL_VERSION_NR < 1041100000 + #include <fstream> #include <cmath> #include <string> @@ -44,17 +50,34 @@ #include "alpha_complex_3d_helper.h" using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; + +// For CGAL < 4.11 +#if CGAL_VERSION_NR < 1041100000 +using Gt = CGAL::Regular_triangulation_euclidean_traits_3<Kernel>; +using Vb = CGAL::Alpha_shape_vertex_base_3<Gt>; +using Fb = CGAL::Alpha_shape_cell_base_3<Gt>; +using Tds = CGAL::Triangulation_data_structure_3<Vb, Fb>; +using Triangulation_3 = CGAL::Regular_triangulation_3<Gt, Tds>; + +// From file type definition +using Point_3 = Gt::Bare_point; +using Weighted_point_3 = Gt::Weighted_point; + +// For CGAL >= 4.11 +#else // CGAL_VERSION_NR < 1041100000 using Rvb = CGAL::Regular_triangulation_vertex_base_3<Kernel>; using Vb = CGAL::Alpha_shape_vertex_base_3<Kernel,Rvb>; using Rcb = CGAL::Regular_triangulation_cell_base_3<Kernel>; using Cb = CGAL::Alpha_shape_cell_base_3<Kernel,Rcb>; using Tds = CGAL::Triangulation_data_structure_3<Vb,Cb>; using Triangulation_3 = CGAL::Regular_triangulation_3<Kernel,Tds>; -using Alpha_shape_3 = CGAL::Alpha_shape_3<Triangulation_3>; // From file type definition using Point_3 = Triangulation_3::Bare_point; using Weighted_point_3 = Triangulation_3::Weighted_point; +#endif // CGAL_VERSION_NR < 1041100000 + +using Alpha_shape_3 = CGAL::Alpha_shape_3<Triangulation_3>; // filtration with alpha values needed type definition using Alpha_value_type = Alpha_shape_3::FT; |