From 733c9efab57e489e849d32123a69ac090d3c585a Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 4 Jun 2019 17:21:59 +0200 Subject: Fix #7 : document better get_persistence_pairs (C++) and persistence_pairs (Python) methods --- .../include/gudhi/Persistent_cohomology.h | 12 ++++++++---- src/cython/cython/simplex_tree.pyx | 5 ++--- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index ca697450..452527c4 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -64,13 +64,18 @@ template class Persistent_cohomology { public: // Data attached to each simplex to interface with a Property Map. + + /** \brief Data stored for each simplex. */ typedef typename FilteredComplex::Simplex_key Simplex_key; + /** \brief Handle to specify a simplex. */ typedef typename FilteredComplex::Simplex_handle Simplex_handle; + /** \brief Type for the value of the filtration function. */ typedef typename FilteredComplex::Filtration_value Filtration_value; + /** \brief Type of element of the field. */ typedef typename CoefficientField::Element Arith_element; /** \brief Persistent interval type. The Arith_element field is used for the multi-field framework. */ typedef std::tuple Persistent_interval; - + private: // Compressed Annotation Matrix types: // Column type @@ -692,9 +697,8 @@ class Persistent_cohomology { return betti_number; } - /** @brief Returns the persistent pairs. - * @return Persistent pairs - * + /** @brief Returns a list of persistence birth and death FilteredComplex::Simplex_handle pairs. + * @return A list of Persistent_cohomology::Persistent_interval */ const std::vector& get_persistent_pairs() const { return persistent_pairs_; diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx index a38e309d..ea99c940 100644 --- a/src/cython/cython/simplex_tree.pyx +++ b/src/cython/cython/simplex_tree.pyx @@ -514,10 +514,9 @@ cdef class SimplexTree: return intervals_result def persistence_pairs(self): - """This function returns the persistence pairs of the simplicial - complex. + """This function returns a list of persistence birth and death simplices pairs. - :returns: The persistence intervals. + :returns: A list of persistence simplices intervals. :rtype: list of pair of list of int :note: persistence_pairs function requires -- cgit v1.2.3