diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-11-16 15:29:05 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-11-16 15:29:05 +0000 |
commit | 83b8e026c0ca3171615e7dc760f0cc61cc7ee933 (patch) | |
tree | 278f6ef5fe0fc92302ff67145c78909abb2217d4 | |
parent | e2c2bda2f4a501863ea3de4c88d2c56aacbaa27a (diff) |
Code review : Factorize some templates
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_3d_module_vincent@3994 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: fe719a7bae84c6378bc9dc583de97414e6f8cf74
-rw-r--r-- | src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index d5aa152a..95e68b7e 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -114,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. @@ -190,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>; |