summaryrefslogtreecommitdiff
path: root/src/python/gudhi/simplex_tree.pyx
diff options
context:
space:
mode:
authorMathieuCarriere <mathieu.carriere3@gmail.com>2020-01-26 02:54:35 -0500
committerMathieuCarriere <mathieu.carriere3@gmail.com>2020-01-26 02:54:35 -0500
commit4c0e6e4144dd3cf6da9600fd4b9bbcac5e664b73 (patch)
treee236a9e35e8655e5dd49cd46064803f14ed589dc /src/python/gudhi/simplex_tree.pyx
parent85ceea9512634a62664208cd2d0f1ce48bafa171 (diff)
added extended persistence function
Diffstat (limited to 'src/python/gudhi/simplex_tree.pyx')
-rw-r--r--src/python/gudhi/simplex_tree.pyx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx
index b18627c4..cfab14f4 100644
--- a/src/python/gudhi/simplex_tree.pyx
+++ b/src/python/gudhi/simplex_tree.pyx
@@ -386,6 +386,20 @@ cdef class SimplexTree:
"""
return self.get_ptr().make_filtration_non_decreasing()
+ def extend_filtration(self):
+ """ This function extends filtration for computing extended persistence.
+ """
+ return self.get_ptr().extend_filtration()
+
+ def convert(self, dgm):
+ """This function retrieves good values for extended persistence, and separate the diagrams into the ordinary, relative, extended+ and extended- subdiagrams. Need extend_filtration to be called first!
+
+ :param dgm: Persistence diagram obtained after calling this->extend_filtration and this->get_persistence.
+ :returns: A vector of four persistence diagrams. The first one is Ordinary, the second one is Relative, the third one is Extended+ and the fourth one is Extended-.
+ """
+ return self.get_ptr().convert(dgm)
+
+
def persistence(self, homology_coeff_field=11, min_persistence=0, persistence_dim_max = False):
"""This function returns the persistence of the simplicial complex.