diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-04-03 21:04:52 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-04-03 21:04:52 +0200 |
commit | 6acbc89d185d1c537778fb2d4a8503bab61fca31 (patch) | |
tree | b8ba4b2ae1b5afc387dd6ab5497c28cfb59e65e3 /src/python/gudhi/periodic_cubical_complex.pyx | |
parent | 2f46606b406aafc69e37a68dca33e1858ab7b817 (diff) |
Split compute_persistence from get_persistence.
Diffstat (limited to 'src/python/gudhi/periodic_cubical_complex.pyx')
-rw-r--r-- | src/python/gudhi/periodic_cubical_complex.pyx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/python/gudhi/periodic_cubical_complex.pyx b/src/python/gudhi/periodic_cubical_complex.pyx index fd08b976..ff5ef3bd 100644 --- a/src/python/gudhi/periodic_cubical_complex.pyx +++ b/src/python/gudhi/periodic_cubical_complex.pyx @@ -32,7 +32,8 @@ cdef extern from "Cubical_complex_interface.h" namespace "Gudhi": cdef extern from "Persistent_cohomology_interface.h" namespace "Gudhi": cdef cppclass Periodic_cubical_complex_persistence_interface "Gudhi::Persistent_cohomology_interface<Gudhi::Cubical_complex::Cubical_complex_interface<Gudhi::cubical_complex::Bitmap_cubical_complex_periodic_boundary_conditions_base<double>>>": Periodic_cubical_complex_persistence_interface(Periodic_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) @@ -154,7 +155,8 @@ cdef class PeriodicCubicalComplex: self.pcohptr = new Periodic_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): |