diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-11 13:57:03 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-11 13:57:03 +0000 |
commit | 16aaf4cda5fd97da12a7f1da8b0a5168fac2e289 (patch) | |
tree | 31554bf878ca21a6330a4a28116398e400072427 /src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h | |
parent | 74bb6a8a2179090ffc5e65bb7e33fdff62ae4a65 (diff) |
Problem of merge with tangentialcomplex branch.
Redo in an integration branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/tangential_integration@1701 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: fa029e8e90b3e203ea675f02098ec6fe95596f9f
Diffstat (limited to 'src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h')
-rw-r--r-- | src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h b/src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h new file mode 100644 index 00000000..b4856742 --- /dev/null +++ b/src/common/include/gudhi_patches/CGAL/NewKernel_d/Vector/determinant_of_vectors_small_dim_internal.h @@ -0,0 +1,164 @@ +// Copyright (c) 2014 +// INRIA Saclay-Ile de France (France) +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// Author(s) : Marc Glisse + +#ifndef CGAL_ALLOWED_INCLUSION +#error Must not include this header directly +#endif +#if !defined(CGAL_TAG) \ + || ! defined(CGAL_CLASS) \ + || ! defined(CGAL_FUNC) \ + || ! defined(CGAL_SIGN_FUNC) \ + || ! defined(CGAL_SHIFT) + +#error Forgot one macro +#endif + +namespace CGAL { + +template <class LA, class Dim_=typename LA::Dimension, + class Max_dim_=typename LA::Max_dimension, + bool=LA::template Property<CGAL_TAG>::value> +struct CGAL_CLASS : LA { + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; +}; + +template <class LA, class Max_dim_> +struct CGAL_CLASS +<LA, Dimension_tag<2+CGAL_SHIFT>, Max_dim_, false> : LA { + typedef typename LA::NT NT; + typedef typename LA::Vector Vector; + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; + template<class P,class=void> struct Property : LA::template Property<P> {}; + template<class D> struct Property<CGAL_TAG, D> : + boost::true_type {}; + + static NT CGAL_FUNC(Vector const&a, Vector const&b){ + return CGAL::determinant_of_vectors<NT>(a,b); + } + template <class V1, class V2> + static Sign CGAL_SIGN_FUNC(V1 const&a, V2 const&b){ + return CGAL::sign_of_determinant_of_vectors<NT>(a,b); + } +}; + +template <class LA, class Max_dim_> +struct CGAL_CLASS +<LA, Dimension_tag<3+CGAL_SHIFT>, Max_dim_, false> : LA { + typedef typename LA::NT NT; + typedef typename LA::Vector Vector; + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; + template<class P,class=void> struct Property : LA::template Property<P> {}; + template<class D> struct Property<CGAL_TAG, D> : + boost::true_type {}; + + static NT CGAL_FUNC(Vector const&a, Vector const&b, + Vector const&c){ + return CGAL::determinant_of_vectors<NT>(a,b,c); + } + static Sign CGAL_SIGN_FUNC(Vector const&a, Vector const&b, + Vector const&c){ + return CGAL::sign_of_determinant_of_vectors<NT>(a,b,c); + } +}; + +template <class LA, class Max_dim_> +struct CGAL_CLASS +<LA, Dimension_tag<4+CGAL_SHIFT>, Max_dim_, false> : LA { + typedef typename LA::NT NT; + typedef typename LA::Vector Vector; + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; + template<class P,class=void> struct Property : LA::template Property<P> {}; + template<class D> struct Property<CGAL_TAG, D> : + boost::true_type {}; + + static NT CGAL_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d){ + return CGAL::determinant_of_vectors<NT>(a,b,c,d); + } + static Sign CGAL_SIGN_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d){ + return CGAL::sign_of_determinant_of_vectors<NT>(a,b,c,d); + } +}; + +template <class LA, class Max_dim_> +struct CGAL_CLASS +<LA, Dimension_tag<5+CGAL_SHIFT>, Max_dim_, false> : LA { + typedef typename LA::NT NT; + typedef typename LA::Vector Vector; + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; + template<class P,class=void> struct Property : LA::template Property<P> {}; + template<class D> struct Property<CGAL_TAG, D> : + boost::true_type {}; + + static NT CGAL_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d, Vector const&e){ + return CGAL::determinant_of_vectors<NT>(a,b,c,d,e); + } + static Sign CGAL_SIGN_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d, Vector const&e){ + return CGAL::sign_of_determinant_of_vectors<NT>(a,b,c,d,e); + } +}; + +template <class LA, class Max_dim_> +struct CGAL_CLASS +<LA, Dimension_tag<6+CGAL_SHIFT>, Max_dim_, false> : LA { + typedef typename LA::NT NT; + typedef typename LA::Vector Vector; + template< class D2, class D3=D2 > + struct Rebind_dimension { + typedef typename LA::template Rebind_dimension<D2,D3> LA2; + typedef CGAL_CLASS<LA2> Other; + }; + template<class P,class=void> struct Property : LA::template Property<P> {}; + template<class D> struct Property<CGAL_TAG, D> : + boost::true_type {}; + + static NT CGAL_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d, Vector const&e, Vector const&f){ + return CGAL::determinant_of_vectors<NT>(a,b,c,d,e,f); + } + static Sign CGAL_SIGN_FUNC(Vector const&a, Vector const&b, + Vector const&c, Vector const&d, Vector const&e, Vector const&f){ + return CGAL::sign_of_determinant_of_vectors<NT>(a,b,c,d,e,f); + } +}; + +} |