diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-03 14:11:41 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-03 14:11:41 +0100 |
commit | a07430764c57c195c9260fc1b301ba0aeb77dcc7 (patch) | |
tree | 5a946e39e7158d4e6e8e3aff04bed9efbde6444e /src/python/gudhi/simplex_tree.pyx | |
parent | 05e28e39717c4ca5871b13a350c4b142ec9a173b (diff) | |
parent | 5900b2d802a7387f7fd4a87b5251dcbe6931371c (diff) |
Merge branch 'master' into weighted_alpha_complex_dD
Diffstat (limited to 'src/python/gudhi/simplex_tree.pyx')
-rw-r--r-- | src/python/gudhi/simplex_tree.pyx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx index 910711a9..c671da56 100644 --- a/src/python/gudhi/simplex_tree.pyx +++ b/src/python/gudhi/simplex_tree.pyx @@ -285,6 +285,20 @@ cdef class SimplexTree: ct.append((v, filtered_simplex.second)) return ct + def get_boundaries(self, simplex): + """This function returns a generator with the boundaries of a given N-simplex. + + :param simplex: The N-simplex, represented by a list of vertex. + :type simplex: list of int. + :returns: The (simplices of the) boundary of a simplex + :rtype: generator with tuples(simplex, filtration) + """ + cdef pair[Simplex_tree_boundary_iterator, Simplex_tree_boundary_iterator] it = self.get_ptr().get_boundary_iterators(simplex) + + while it.first != it.second: + yield self.get_ptr().get_simplex_and_filtration(dereference(it.first)) + preincrement(it.first) + def remove_maximal_simplex(self, simplex): """This function removes a given maximal N-simplex from the simplicial complex. |