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
31namespace alpha_complex {
41template <
typename Kernel,
bool Weighted = false >
46template <
typename Kernel >
54 using Weighted_point_d = void;
55 using Point_d =
typename Kernel::Point_d;
57 using FT =
typename Kernel::FT;
59 using Sphere =
typename std::pair<Point_d, FT>;
61 int get_dimension(
const Point_d& p0)
const {
62 return kernel_.point_dimension_d_object()(p0);
65 template<
class Po
intIterator>
66 Sphere get_sphere(PointIterator begin, PointIterator end)
const {
67 Point_d c = kernel_.construct_circumcenter_d_object()(begin, end);
68 FT r = kernel_.squared_distance_d_object()(c, *begin);
69 return std::make_pair(std::move(c), std::move(r));
72 template<
class Po
intIterator>
73 FT get_squared_radius(PointIterator begin, PointIterator end)
const {
74 return kernel_.compute_squared_radius_d_object()(begin, end);
77 FT get_squared_radius(
const Sphere& sph)
const {
81 bool is_gabriel(
const Sphere& circumcenter,
const Point_d& point) {
82 return kernel_.squared_distance_d_object()(circumcenter.first, point) >= circumcenter.second;
87template <
typename Kernel >
88class Alpha_kernel_d<Kernel, true> {
96 using Weighted_point_d =
typename Kernel::Weighted_point_d;
97 using Bare_point_d =
typename Kernel::Point_d;
99 using FT =
typename Kernel::FT;
101 using Sphere = Weighted_point_d;
103 int get_dimension(
const Weighted_point_d& p0)
const {
104 return kernel_.point_dimension_d_object()(p0.point());
107 template<
class Po
intIterator>
108 Sphere get_sphere(PointIterator begin, PointIterator end)
const {
110#if CGAL_VERSION_NR < 1050200000
111 return kernel_.power_center_d_object()(begin, end);
113 return kernel_.construct_power_sphere_d_object()(begin, end);
117 template<
class Po
intIterator>
118 FT get_squared_radius(PointIterator begin, PointIterator end)
const {
119 return kernel_.compute_squared_radius_smallest_orthogonal_sphere_d_object()(begin, end);
122 FT get_squared_radius(
const Sphere& sph)
const {
126 bool is_gabriel(
const Sphere& circumcenter,
const Weighted_point_d& point) {
128#if CGAL_VERSION_NR < 1050200000
129 return kernel_.power_distance_d_object()(circumcenter, point) >= 0;
131 return kernel_.compute_power_product_d_object()(circumcenter, point) >= 0;
138namespace alphacomplex = alpha_complex;
Alpha complex kernel container.
Definition: Alpha_kernel_d.h:42
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14