From 309d5aa575735acefabc33abade72637c52fb931 Mon Sep 17 00:00:00 2001 From: skachano Date: Fri, 7 Oct 2016 16:08:41 +0000 Subject: Added a big chunk of documentation. +small fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1679 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d3166034bf662121bc21583bb027c67f736e904c --- .../include/gudhi/Strong_witness_complex.h | 40 +++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'src/Witness_complex/include/gudhi/Strong_witness_complex.h') diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h index 1ce050ad..e64f8f20 100644 --- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h +++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h @@ -37,6 +37,22 @@ namespace Gudhi { namespace witness_complex { +/** + * \private + * \class Strong_witness_complex + * \brief Constructs strong witness complex for the given sets of witnesses and landmarks. + * \ingroup witness_complex + * + * \tparam Kernel_ requires a CGAL::Epick_d class, which + * can be static if you know the ambiant dimension at compile-time, or dynamic if you don't. + * \tparam DimensionTag can be either Dimension_tag + * if you know the intrinsic dimension at compile-time, + * or CGAL::Dynamic_dimension_tag + * if you don't. + */ template< class Kernel_ > class Strong_witness_complex { private: @@ -55,7 +71,7 @@ private: typedef FT Filtration_value; - typedef std::ptrdiff_t Witness_id; + typedef std::size_t Witness_id; typedef typename Nearest_landmark_range::Point_with_transformed_distance Id_distance_pair; typedef typename Id_distance_pair::first_type Landmark_id; typedef Active_witness ActiveWitness; @@ -63,6 +79,8 @@ private: typedef std::vector< Landmark_id > typeVectorVertex; typedef std::pair< typeVectorVertex, Filtration_value> typeSimplex; + typedef Landmark_id Vertex_handle; + private: Point_range witnesses_, landmarks_; Kd_tree landmark_tree_; @@ -74,9 +92,13 @@ private: //@{ - /* + /** * \brief Initializes member variables before constructing simplicial complex. - * \details The parameters should satisfy InputIterator C++ concepts. + * \details Records landmarks from the range [landmarks_first, landmarks_last) into a + * table internally, as well as witnesses from the range [witnesses_first, witnesses_last). + * All iterator parameters should satisfy InputIterator + * C++ concept. */ template< typename InputIteratorLandmarks, typename InputIteratorWitnesses > @@ -90,15 +112,17 @@ private: /** \brief Returns the point corresponding to the given vertex. */ - Point_d get_point( std::size_t vertex ) const + template + Point_d get_point( Vertex_handle vertex ) const { return landmarks_[vertex]; } - /** \brief Outputs the (strong) witness complex with - * squared relaxation parameter 'max_alpha_square' - * to simplicial complex 'complex'. - * The parameter 'limit_dimension' represents the maximal dimension of the simplicial complex + /** \brief Outputs the strong witness complex in a simplicial complex data structure. + * @param[out] complex Simplicial complex data structure compatible with 'find' and 'insert' operations. + * (Cf SimplicialComplexForWitness) + * @param[in] max_alpha_square Maximal squared relaxation parameter. + * @param[in] limit_dimension Represents the maximal dimension of the simplicial complex * (default value = no limit). */ template < typename SimplicialComplexForWitness > -- cgit v1.2.3