summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ripser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 0a32a6d..0822eb2 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -545,7 +545,7 @@ public:
template <typename Column>
void add_coboundary(compressed_sparse_matrix<diameter_entry_t>& reduction_matrix,
- std::vector<diameter_index_t>& columns_to_reduce,
+ const std::vector<diameter_index_t>& columns_to_reduce,
const index_t index_column_to_add, const coefficient_t factor,
Column& working_reduction_column, Column& working_coboundary,
const index_t& dim) {
@@ -559,7 +559,7 @@ public:
}
}
- void compute_pairs(std::vector<diameter_index_t>& columns_to_reduce,
+ void compute_pairs(const std::vector<diameter_index_t>& columns_to_reduce,
entry_hash_map& pivot_column_index, const index_t dim) {
#ifdef PRINT_PERSISTENCE_PAIRS
@@ -603,6 +603,7 @@ public:
modulus - get_coefficient(pivot) *
multiplicative_inverse[get_coefficient(other_pivot)] %
modulus;
+
add_coboundary(reduction_matrix, columns_to_reduce, index_column_to_add,
factor, working_reduction_column, working_coboundary, dim);