summaryrefslogtreecommitdiff
path: root/src/python/gudhi/simplex_tree.pyx
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-03-24 14:50:53 +0100
committerMarc Glisse <marc.glisse@inria.fr>2020-03-24 15:23:44 +0100
commitec4a9583adaa73c01b05a4b30425581ed7256379 (patch)
treeec5d9bb90fb86489c4dd1c7ea6a4b0d26083c31e /src/python/gudhi/simplex_tree.pyx
parentb7e19cf798e1dbf203380f1fe48aa0709177d7de (diff)
Remove min_persistence from generators
It is supposed to be handled in persistence() already.
Diffstat (limited to 'src/python/gudhi/simplex_tree.pyx')
-rw-r--r--src/python/gudhi/simplex_tree.pyx18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx
index faa9f9d8..beb40bc4 100644
--- a/src/python/gudhi/simplex_tree.pyx
+++ b/src/python/gudhi/simplex_tree.pyx
@@ -526,15 +526,10 @@ cdef class SimplexTree:
print("intervals_in_dim function requires persistence function"
" to be launched first.")
- def lower_star_persistence_generators(self, min_persistence=0.):
+ def lower_star_persistence_generators(self):
"""Assuming this is a lower-star filtration, this function returns the persistence pairs,
where each simplex is replaced with the vertex that gave it its filtration value.
- :param min_persistence: The minimum persistence value to take into
- account (strictly greater than min_persistence). Default value is
- 0.0.
- Set min_persistence to -1.0 to see all values.
- :type min_persistence: float.
:returns: First the regular persistence pairs, grouped by dimension, with one vertex per extremity,
and second the essential features, grouped by dimension, with one vertex each
:rtype: Tuple[List[numpy.array[int] of shape (n,2)], List[numpy.array[int] of shape (m,)]]
@@ -542,22 +537,17 @@ cdef class SimplexTree:
:note: lower_star_persistence_generators requires that `persistence()` be called first.
"""
if self.pcohptr != NULL:
- gen = self.pcohptr.lower_star_generators(min_persistence)
+ gen = self.pcohptr.lower_star_generators()
normal = [np_array(d).reshape(-1,2) for d in gen.first]
infinite = [np_array(d) for d in gen.second]
return (normal, infinite)
else:
print("lower_star_persistence_generators() requires that persistence() be called first.")
- def flag_persistence_generators(self, min_persistence=0.):
+ def flag_persistence_generators(self):
"""Assuming this is a flag complex, this function returns the persistence pairs,
where each simplex is replaced with the vertices of the edges that gave it its filtration value.
- :param min_persistence: The minimum persistence value to take into
- account (strictly greater than min_persistence). Default value is
- 0.0.
- Set min_persistence to -1.0 to see all values.
- :type min_persistence: float.
:returns: First the regular persistence pairs of dimension 0, with one vertex for birth and two for death;
then the other regular persistence pairs, grouped by dimension, with 2 vertices per extremity;
then the connected components, with one vertex each;
@@ -567,7 +557,7 @@ cdef class SimplexTree:
:note: flag_persistence_generators requires that `persistence()` be called first.
"""
if self.pcohptr != NULL:
- gen = self.pcohptr.flag_generators(min_persistence)
+ gen = self.pcohptr.flag_generators()
if len(gen.first) == 0:
normal0 = numpy.empty((0,3))
normals = []