11 #ifndef ALPHA_COMPLEX_ALPHA_KERNEL_D_H_ 12 #define ALPHA_COMPLEX_ALPHA_KERNEL_D_H_ 14 #include <CGAL/version.h> 21 #if CGAL_VERSION_NR < 1041101000 22 # error Alpha_complex is only available for CGAL >= 4.11 25 #if !EIGEN_VERSION_AT_LEAST(3,1,0) 26 # error Alpha_complex is only available for Eigen3 >= 3.1.0 installed with CGAL 31 namespace alpha_complex {
41 template <
typename Kernel,
bool Weighted = false >
46 template <
typename Kernel >
53 using Weighted_point_d = void;
54 using Point_d =
typename Kernel::Point_d;
56 using FT =
typename Kernel::FT;
58 using Sphere =
typename std::pair<Point_d, FT>;
60 int get_dimension(
const Point_d& p0)
const {
61 return kernel_.point_dimension_d_object()(p0);
64 template<
class Po
intIterator>
65 Sphere get_sphere(PointIterator begin, PointIterator end)
const {
66 Point_d c = kernel_.construct_circumcenter_d_object()(begin, end);
67 FT r = kernel_.squared_distance_d_object()(c, *begin);
68 return std::make_pair(std::move(c), std::move(r));
71 template<
class Po
intIterator>
72 FT get_squared_radius(PointIterator begin, PointIterator end)
const {
73 return kernel_.compute_squared_radius_d_object()(begin, end);
76 FT get_squared_radius(
const Sphere& sph)
const {
80 bool is_gabriel(
const Sphere& circumcenter,
const Point_d& point) {
81 return kernel_.squared_distance_d_object()(circumcenter.first, point) >= circumcenter.second;
86 template <
typename Kernel >
95 using Weighted_point_d =
typename Kernel::Weighted_point_d;
96 using Bare_point_d =
typename Kernel::Point_d;
98 using FT =
typename Kernel::FT;
100 using Sphere = Weighted_point_d;
102 int get_dimension(
const Weighted_point_d& p0)
const {
103 return kernel_.point_dimension_d_object()(p0.point());
106 template<
class Po
intIterator>
107 Sphere get_sphere(PointIterator begin, PointIterator end)
const {
109 #if CGAL_VERSION_NR < 1050200000 110 return kernel_.power_center_d_object()(begin, end);
112 return kernel_.construct_power_sphere_d_object()(begin, end);
116 template<
class Po
intIterator>
117 FT get_squared_radius(PointIterator begin, PointIterator end)
const {
118 return kernel_.compute_squared_radius_smallest_orthogonal_sphere_d_object()(begin, end);
121 FT get_squared_radius(
const Sphere& sph)
const {
125 bool is_gabriel(
const Sphere& circumcenter,
const Weighted_point_d& point) {
127 #if CGAL_VERSION_NR < 1050200000 128 return kernel_.power_distance_d_object()(circumcenter, point) >= 0;
130 return kernel_.compute_power_product_d_object()(circumcenter, point) >= 0;
137 namespace alphacomplex = alpha_complex;
141 #endif // ALPHA_COMPLEX_ALPHA_KERNEL_D_H_ Definition: SimplicialComplexForAlpha.h:14
Alpha complex kernel container.
Definition: Alpha_kernel_d.h:42