summaryrefslogtreecommitdiff
path: root/src/python/gudhi/cubical_complex.pyx
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-04-03 21:04:52 +0200
committerMarc Glisse <marc.glisse@inria.fr>2020-04-03 21:04:52 +0200
commit6acbc89d185d1c537778fb2d4a8503bab61fca31 (patch)
treeb8ba4b2ae1b5afc387dd6ab5497c28cfb59e65e3 /src/python/gudhi/cubical_complex.pyx
parent2f46606b406aafc69e37a68dca33e1858ab7b817 (diff)
Split compute_persistence from get_persistence.
Diffstat (limited to 'src/python/gudhi/cubical_complex.pyx')
-rw-r--r--src/python/gudhi/cubical_complex.pyx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/python/gudhi/cubical_complex.pyx b/src/python/gudhi/cubical_complex.pyx
index d5ad1266..ce844558 100644
--- a/src/python/gudhi/cubical_complex.pyx
+++ b/src/python/gudhi/cubical_complex.pyx
@@ -35,7 +35,8 @@ cdef extern from "Cubical_complex_interface.h" namespace "Gudhi":
cdef extern from "Persistent_cohomology_interface.h" namespace "Gudhi":
cdef cppclass Cubical_complex_persistence_interface "Gudhi::Persistent_cohomology_interface<Gudhi::Cubical_complex::Cubical_complex_interface<>>":
Cubical_complex_persistence_interface(Bitmap_cubical_complex_base_interface * st, bool persistence_dim_max)
- vector[pair[int, pair[double, double]]] get_persistence(int homology_coeff_field, double min_persistence)
+ void compute_persistence(int homology_coeff_field, double min_persistence)
+ vector[pair[int, pair[double, double]]] get_persistence()
vector[int] betti_numbers()
vector[int] persistent_betti_numbers(double from_value, double to_value)
vector[pair[double,double]] intervals_in_dimension(int dimension)
@@ -149,7 +150,8 @@ cdef class CubicalComplex:
self.pcohptr = new Cubical_complex_persistence_interface(self.thisptr, True)
cdef vector[pair[int, pair[double, double]]] persistence_result
if self.pcohptr != NULL:
- persistence_result = self.pcohptr.get_persistence(homology_coeff_field, min_persistence)
+ self.pcohptr.compute_persistence(homology_coeff_field, min_persistence)
+ persistence_result = self.pcohptr.get_persistence()
return persistence_result
def betti_numbers(self):