From 05aafa8f990f02c121028bbfb28bb352487f864e Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Wed, 22 Feb 2017 11:26:45 +0000 Subject: Fix code review git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@2092 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: df50df0878cdb5ae351b96b4b29e4c95940ae4b8 --- src/cython/cython/tangential_complex.pyx | 54 +++++++++++------------------- src/cython/doc/tangential_complex_user.rst | 2 +- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/src/cython/cython/tangential_complex.pyx b/src/cython/cython/tangential_complex.pyx index 1b213c3a..7b54e48e 100644 --- a/src/cython/cython/tangential_complex.pyx +++ b/src/cython/cython/tangential_complex.pyx @@ -46,22 +46,9 @@ cdef extern from "Tangential_complex_interface.h" namespace "Gudhi": # TangentialComplex python interface cdef class TangentialComplex: - """TangentialComplex is a simplicial complex constructed from the finite cells - of a Delaunay Triangulation. - - The filtration value of each simplex is computed as the square of the - circumradius of the simplex if the circumsphere is empty (the simplex is - then said to be Gabriel), and as the minimum of the filtration values of - the codimension 1 cofaces that make it not Gabriel otherwise. - - All simplices that have a filtration value strictly greater than a given - alpha squared value are not inserted into the complex. - - .. note:: - - When Tangential_complex is constructed with an infinite value of alpha, the - complex is a Delaunay complex. - + """The class Tangential_complex represents a tangential complex. After the + computation of the complex, an optional post-processing called perturbation + can be run to attempt to remove inconsistencies. """ cdef Tangential_complex_interface * thisptr @@ -107,46 +94,44 @@ cdef class TangentialComplex: :param vertex: The vertex. :type vertex: int. - :returns: list of float -- the point. + :returns: The point. + :rtype: list of float """ cdef vector[double] point = self.thisptr.get_point(vertex) return point def num_vertices(self): - """This function returns the number of vertices. - - :returns: unsigned -- the number of vertices. + """ + :returns: The number of vertices. + :rtype: unsigned """ return self.thisptr.number_of_vertices() def num_simplices(self): - """This function returns the number of simplices. - - :returns: unsigned -- the number of simplices. + """ + :returns: Total number of simplices in stars (including duplicates that appear in several stars). + :rtype: unsigned """ return self.thisptr.number_of_simplices() def num_inconsistent_simplices(self): - """This function returns the number of inconsistent simplices. - - :returns: unsigned -- the number of inconsistent simplices. + """ + :returns: The number of inconsistent simplices. + :rtype: unsigned """ return self.thisptr.number_of_inconsistent_simplices() def num_inconsistent_stars(self): - """This function returns the number of inconsistent stars. - - :returns: unsigned -- the number of inconsistent stars. + """ + :returns: The number of stars containing at least one inconsistent simplex. + :rtype: unsigned """ return self.thisptr.number_of_inconsistent_stars() def create_simplex_tree(self): - """This function creates the given simplex tree from the Delaunay - Triangulation. + """Exports the complex into a simplex tree. - :param simplex_tree: The simplex tree to create (must be empty) - :type simplex_tree: SimplexTree - :returns: A simplex tree created from the Delaunay Triangulation. + :returns: A simplex tree created from the complex. :rtype: SimplexTree """ simplex_tree = SimplexTree() @@ -155,6 +140,7 @@ cdef class TangentialComplex: def fix_inconsistencies_using_perturbation(self, max_perturb, time_limit=-1.0): """Attempts to fix inconsistencies by perturbing the point positions. + :param max_perturb: Maximum length of the translations used by the perturbation. :type max_perturb: double diff --git a/src/cython/doc/tangential_complex_user.rst b/src/cython/doc/tangential_complex_user.rst index 2679528c..6c3debb4 100644 --- a/src/cython/doc/tangential_complex_user.rst +++ b/src/cython/doc/tangential_complex_user.rst @@ -14,7 +14,7 @@ dimension. The running time depends only linearly on the extrinsic dimension :math:`d` and exponentially on the intrinsic dimension :math:`k`. An extensive description of the Tangential complex can be found in -:cite:`tangentialcomplex2014`). +:cite:`tangentialcomplex2014`. What is a Tangential Complex? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.2.3