diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-05-23 15:01:05 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-05-23 15:01:05 +0200 |
commit | 9835e62798b7ee401030e9d242bb4ccbdd2705d4 (patch) | |
tree | 5905ee8e744972f5c79fd0cae35f0eae844c2f4e | |
parent | f1976496d2a98a244eabf8ab38764687ec7d9442 (diff) |
default build with coefficients enabled
-rw-r--r-- | ripser.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -541,6 +541,8 @@ public: #else #ifdef USE_COEFFICIENTS std::vector<diameter_entry_t> reduction_matrix; +#else + std::vector<diameter_index_t>& reduction_matrix(columns_to_reduce); #endif #endif @@ -582,8 +584,10 @@ public: // initialize reduction_matrix as identity matrix reduction_matrix.append_column(); #endif +#if defined ASSEMBLE_REDUCTION_MATRIX || defined USE_COEFFICIENTS reduction_matrix.push_back(diameter_entry_t(column_to_reduce, 1)); - +#endif + bool might_be_apparent_pair = (index_column_to_reduce == index_column_to_add); while (true) { @@ -591,13 +595,8 @@ public: auto reduction_column_begin = reduction_matrix.cbegin(index_column_to_add), reduction_column_end = reduction_matrix.cend(index_column_to_add); #else -#ifdef USE_COEFFICIENTS auto reduction_column_begin = &reduction_matrix[index_column_to_add], reduction_column_end = &reduction_matrix[index_column_to_add] + 1; -#else - auto reduction_column_begin = &columns_to_reduce[index_column_to_add], - reduction_column_end = &columns_to_reduce[index_column_to_add] + 1; -#endif #endif pivot = add_coboundary_and_get_pivot( |