diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2020-12-31 17:40:14 +0100 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2020-12-31 17:40:14 +0100 |
commit | 2e94017f94f071b195534e97e83ab2da7af6de23 (patch) | |
tree | 130cc58eca2572a7a9bddc8709cb9bed84ce1532 | |
parent | 1c8b1931eb470a4c8f9d0ecd19cdfe41f913eb64 (diff) | |
parent | 87c56be63f1042d0fbe8b7d5dcac330a3b9fe3d7 (diff) |
Merge commit '87c56be63f1042d0fbe8b7d5dcac330a3b9fe3d7' into apparent-pairs-new
* commit '87c56be63f1042d0fbe8b7d5dcac330a3b9fe3d7':
minor cleanup
-rw-r--r-- | ripser.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -531,12 +531,11 @@ public: std::chrono::steady_clock::time_point next = std::chrono::steady_clock::now() + time_step; #endif - --dim; columns_to_reduce.clear(); std::vector<diameter_index_t> next_simplices; for (diameter_index_t& simplex : simplices) { - simplex_coboundary_enumerator cofacets(diameter_entry_t(simplex, 1), dim, *this); + simplex_coboundary_enumerator cofacets(diameter_entry_t(simplex, 1), dim - 1, *this); while (cofacets.has_next(false)) { #ifdef INDICATE_PROGRESS @@ -552,9 +551,9 @@ public: next_simplices.push_back({get_diameter(cofacet), get_index(cofacet)}); - if ((pivot_column_index.find(get_entry(cofacet)) == pivot_column_index.end()) && - (get_index(get_apparent_cofacet(cofacet, dim + 1)) == -1) && - (get_index(get_apparent_facet(cofacet, dim + 1)) == -1)) + if ((get_index(get_apparent_cofacet(cofacet, dim)) == -1) && + (pivot_column_index.find(get_entry(cofacet)) == pivot_column_index.end()) && + (get_index(get_apparent_facet(cofacet, dim)) == -1)) columns_to_reduce.push_back({get_diameter(cofacet), get_index(cofacet)}); } } @@ -596,11 +595,8 @@ public: std::cout << " [0," << get_diameter(e) << ")" << std::endl; #endif dset.link(u, v); - } else { - if ((get_index(get_apparent_cofacet(e, 1)) == -1) && - (get_index(get_apparent_facet(e, 1)) == -1)) - columns_to_reduce.push_back(e); - } + } else if (get_index(get_apparent_cofacet(e, 1)) == -1) + columns_to_reduce.push_back(e); } std::reverse(columns_to_reduce.begin(), columns_to_reduce.end()); |