Skip to content

Commit

Permalink
add prune wrt dim
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLapous committed Sep 21, 2023
1 parent 4f89234 commit 6267d41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/python/gudhi/simplex_tree_multi.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ cdef extern from "Simplex_tree_interface_multi.h" namespace "Gudhi::multiparamet
void expansion(int max_dim) except + nogil
void remove_maximal_simplex(simplex_type simplex) nogil
# bool prune_above_filtration(filtration_type filtration) nogil
bool prune_above_dimension(int dimension) nogil
bool make_filtration_non_decreasing() except + nogil
# void compute_extended_filtration() nogil
# Simplex_tree_multi_interface* collapse_edges(int nb_collapse_iteration) except + nogil
Expand Down
8 changes: 8 additions & 0 deletions src/python/gudhi/simplex_tree_multi.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,15 @@ cdef class SimplexTreeMulti:
# method to recompute the exact dimension.
# """
# return self.get_ptr().prune_above_filtration(filtration)
def prune_above_dimension(self, int dimension):
"""Remove all simplices of dimension greater than a given value.
:param dimension: Maximum dimension value.
:type dimension: int
:returns: The modification information.
:rtype: bool
"""
return self.get_ptr().prune_above_dimension(dimension)
def expansion(self, int max_dim)->SimplexTreeMulti:
"""Expands the simplex tree containing only its one skeleton
until dimension max_dim.
Expand Down

0 comments on commit 6267d41

Please sign in to comment.