From ce097f4fd26faf1b52d7a50769f809feeab60c3d Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 22 Mar 2016 12:55:19 +0000 Subject: Add a comment to say Alpha complex takes the ownership of the pointer on the Delaunay Triangulation. Add public typedef Delaunay_triangulation, Point_d and Geom_traits git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1067 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1137a9912ebac38a14d680921e62cd36e0068153 --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/Alpha_complex') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 0b6875af..7c64b53e 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -34,6 +34,7 @@ #include // isnan, fmax #include +#include #include #include @@ -62,13 +63,24 @@ namespace alphacomplex { * * The complex is a template class requiring an Epick_d dD Geometry Kernel - * \cite cgal:s-gkd-15b from CGAL as template. + * \cite cgal:s-gkd-15b from CGAL as template, default value is CGAL::Epick_d + * < + * CGAL::Dynamic_dimension_tag > * * \remark When Alpha_complex is constructed with an infinite value of alpha, the complex is a Delaunay complex. * */ -template +template> class Alpha_complex : public Simplex_tree<> { + public: + /** \brief A Delaunay triangulation of a set of points in \f$ \mathbb{R}^D\f$.*/ + typedef typename CGAL::Delaunay_triangulation Delaunay_triangulation; + /** \brief A point in Euclidean space.*/ + typedef typename Kernel::Point_d Point_d; + /** \brief Geometric traits class that provides the geometric types and predicates needed by Delaunay + * triangulations.*/ + typedef Kernel Geom_traits; private: // From Simplex_tree // Type required to insert into a simplex_tree (with or without subfaces). @@ -77,15 +89,10 @@ class Alpha_complex : public Simplex_tree<> { // Simplex_result is the type returned from simplex_tree insert function. typedef typename std::pair Simplex_result; - // Delaunay_triangulation type required to create an alpha-complex. - typedef typename CGAL::Delaunay_triangulation Delaunay_triangulation; - typedef typename Kernel::Compute_squared_radius_d Squared_Radius; typedef typename Kernel::Side_of_bounded_sphere_d Is_Gabriel; typedef typename Kernel::Point_dimension_d Point_Dimension; - typedef typename Kernel::Point_d Point_d; - // Type required to compute squared radius, or side of bounded sphere on a vector of points. typedef typename std::vector Vector_of_CGAL_points; @@ -135,6 +142,8 @@ class Alpha_complex : public Simplex_tree<> { * @param[in] triangulation_ptr Pointer on a * CGAL::Delaunay_triangulation \cite cgal:hdj-t-15b. + * Alpha_complex takes ownership of the Delaunay_triangulation object, which must have been allocated using operator + * new. * @param[in] max_alpha_square maximum for alpha square value. Default value is +\f$\infty\f$. */ Alpha_complex(Delaunay_triangulation* triangulation_ptr, -- cgit v1.2.3