From 6b1843bc5f19800433eedd288f2d966a985bcc16 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 23 Sep 2016 07:26:41 +0000 Subject: Modify the Alpha complex doc wit a concept to create a simplicial complex from alpha complex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alpha_complex_create_complex@1546 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d8083c3b0e03e1cf0033e5c7c1ba6f95618efdc1 --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 31 +++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'src/Alpha_complex/include') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 66a55ac7..ab96531f 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -206,17 +206,17 @@ class Alpha_complex { } public: - template - bool create_complex(Simplicial_complex& complex) { - typedef typename Simplicial_complex::Filtration_value Filtration_value; + template + bool create_complex(SimplicialComplexForAlpha& complex) { + typedef typename SimplicialComplexForAlpha::Filtration_value Filtration_value; return create_complex(complex, std::numeric_limits::infinity()); } /** \brief Initialize the simplicial complex from the Delaunay triangulation. * - * \tparam Simplicial_complex must meet Simplicial_complex_for_alpha concept. + * \tparam SimplicialComplexForAlpha must meet `SimplicialComplexForAlpha` concept. * - * @param[in] complex Simplicial_complex to be created. + * @param[in] complex SimplicialComplexForAlpha to be created. * @param[in] max_alpha_square maximum for alpha square value. Default value is +\f$\infty\f$. * * @return true if creation succeeds, false otherwise. @@ -226,10 +226,11 @@ class Alpha_complex { * * Initialization can be launched once. */ - template - bool create_complex(Simplicial_complex& complex, Filtration_value max_alpha_square) { - // From Simplicial_complex type required to insert into a simplicial complex (with or without subfaces). - typedef typename Simplicial_complex::Vertex_handle Vertex_handle; + template + bool create_complex(SimplicialComplexForAlpha& complex, Filtration_value max_alpha_square) { + // From SimplicialComplexForAlpha type required to insert into a simplicial complex (with or without subfaces). + typedef typename SimplicialComplexForAlpha::Vertex_handle Vertex_handle; + typedef typename SimplicialComplexForAlpha::Simplex_handle Simplex_handle; typedef std::vector Vector_vertex; if (triangulation_ == nullptr) { @@ -294,7 +295,7 @@ class Alpha_complex { // ### For i : d -> 0 for (int decr_dim = complex.dimension(); decr_dim >= 0; decr_dim--) { // ### Foreach Sigma of dim i - for (auto f_simplex : complex.skeleton_simplex_range(decr_dim)) { + for (Simplex_handle f_simplex : complex.skeleton_simplex_range(decr_dim)) { int f_simplex_dim = complex.dimension(f_simplex); if (decr_dim == f_simplex_dim) { pointVector.clear(); @@ -345,12 +346,12 @@ class Alpha_complex { } private: - template - void propagate_alpha_filtration(Simplicial_complex& complex, Simplex_handle f_simplex, int decr_dim) { - // From Simplicial_complex type required to assign filtration values. - typedef typename Simplicial_complex::Filtration_value Filtration_value; + template + void propagate_alpha_filtration(SimplicialComplexForAlpha& complex, Simplex_handle f_simplex, int decr_dim) { + // From SimplicialComplexForAlpha type required to assign filtration values. + typedef typename SimplicialComplexForAlpha::Filtration_value Filtration_value; #ifdef DEBUG_TRACES - typedef typename Simplicial_complex::Vertex_handle Vertex_handle; + typedef typename SimplicialComplexForAlpha::Vertex_handle Vertex_handle; #endif // DEBUG_TRACES // ### Foreach Tau face of Sigma -- cgit v1.2.3