diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-03-24 14:50:53 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-03-24 15:23:44 +0100 |
commit | ec4a9583adaa73c01b05a4b30425581ed7256379 (patch) | |
tree | ec5d9bb90fb86489c4dd1c7ea6a4b0d26083c31e /src/python/include/Persistent_cohomology_interface.h | |
parent | b7e19cf798e1dbf203380f1fe48aa0709177d7de (diff) |
Remove min_persistence from generators
It is supposed to be handled in persistence() already.
Diffstat (limited to 'src/python/include/Persistent_cohomology_interface.h')
-rw-r--r-- | src/python/include/Persistent_cohomology_interface.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/python/include/Persistent_cohomology_interface.h b/src/python/include/Persistent_cohomology_interface.h index 3ce40af5..3074389c 100644 --- a/src/python/include/Persistent_cohomology_interface.h +++ b/src/python/include/Persistent_cohomology_interface.h @@ -100,7 +100,7 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol // - an option to return only some of those vectors? typedef std::pair<std::vector<std::vector<int>>, std::vector<std::vector<int>>> Generators; - Generators lower_star_generators(double min_persistence) { + Generators lower_star_generators() { Generators out; // diags[i] should be interpreted as vector<array<int,2>> auto& diags = out.first; @@ -109,8 +109,6 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol for (auto pair : Base::get_persistent_pairs()) { auto s = std::get<0>(pair); auto t = std::get<1>(pair); - if(stptr_->filtration(t) - stptr_->filtration(s) <= min_persistence) - continue; int dim = stptr_->dimension(s); auto v = stptr_->vertex_with_same_filtration(s); if(t == stptr_->null_simplex()) { @@ -128,7 +126,7 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol // An alternative, to avoid those different sizes, would be to "pad" vertex generator v as (v, v) or (v, -1). When using it as index, this corresponds to adding the vertex filtration values either on the diagonal of the distance matrix, or as an extra row or column. // We could also merge the vectors for different dimensions into a single one, with an extra column for the dimension (converted to type double). - Generators flag_generators(double min_persistence) { + Generators flag_generators() { Generators out; // diags[0] should be interpreted as vector<array<int,3>> and other diags[i] as vector<array<int,4>> auto& diags = out.first; @@ -137,8 +135,6 @@ persistent_cohomology::Persistent_cohomology<FilteredComplex, persistent_cohomol for (auto pair : Base::get_persistent_pairs()) { auto s = std::get<0>(pair); auto t = std::get<1>(pair); - if(stptr_->filtration(t) - stptr_->filtration(s) <= min_persistence) - continue; int dim = stptr_->dimension(s); bool infinite = t == stptr_->null_simplex(); if(infinite) { |