summaryrefslogtreecommitdiff
path: root/src/Alpha_complex/include/gudhi
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-22 12:55:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-03-22 12:55:19 +0000
commitce097f4fd26faf1b52d7a50769f809feeab60c3d (patch)
tree6562db91a84fcb600f1d2195311859d762d8dfdc /src/Alpha_complex/include/gudhi
parent071c0495ae1ed556f17120ca7c249106f5e34f9b (diff)
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
Diffstat (limited to 'src/Alpha_complex/include/gudhi')
-rw-r--r--src/Alpha_complex/include/gudhi/Alpha_complex.h23
1 files changed, 16 insertions, 7 deletions
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 <math.h> // isnan, fmax
#include <CGAL/Delaunay_triangulation.h>
+#include <CGAL/Epick_d.h>
#include <iostream>
#include <vector>
@@ -62,13 +63,24 @@ namespace alphacomplex {
*
* The complex is a template class requiring an Epick_d <a target="_blank"
* href="http://doc.cgal.org/latest/Kernel_d/index.html#Chapter_dD_Geometry_Kernel">dD Geometry Kernel</a>
- * \cite cgal:s-gkd-15b from CGAL as template.
+ * \cite cgal:s-gkd-15b from CGAL as template, default value is <a target="_blank"
+ * href="http://doc.cgal.org/latest/Kernel_d/classCGAL_1_1Epick__d.html">CGAL::Epick_d</a>
+ * < <a target="_blank" href="http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Dynamic__dimension__tag.html">
+ * CGAL::Dynamic_dimension_tag </a> >
*
* \remark When Alpha_complex is constructed with an infinite value of alpha, the complex is a Delaunay complex.
*
*/
-template<class Kernel>
+template<class Kernel = CGAL::Epick_d<CGAL::Dynamic_dimension_tag>>
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<Kernel> 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_handle, bool> Simplex_result;
- // Delaunay_triangulation type required to create an alpha-complex.
- typedef typename CGAL::Delaunay_triangulation<Kernel> 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<Point_d> Vector_of_CGAL_points;
@@ -135,6 +142,8 @@ class Alpha_complex : public Simplex_tree<> {
* @param[in] triangulation_ptr Pointer on a <a target="_blank"
* href="http://doc.cgal.org/latest/Triangulation/index.html#Chapter_Triangulations">
* CGAL::Delaunay_triangulation<Kernel></a> \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,