diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2016-09-20 09:35:45 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2016-09-20 09:35:45 +0200 |
commit | 42a60a47c9bf12c5249fdea9b354fe352170950f (patch) | |
tree | 4dff2d27736fc7b7abb5754df8aca8c53300e890 /ripser.cpp | |
parent | ad46246d05aaef70d523b96d483e5a6407404cb1 (diff) |
bug fix in sparse coboundary enumerator
Diffstat (limited to 'ripser.cpp')
-rw-r--r-- | ripser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -333,7 +333,7 @@ public: for (index_t i = 0; i < size(); ++i) for (index_t j = 0; j < size(); ++j) - if (i != j && mat(i, j) <= threshold) neighbors[i].push_back(diameter_index_t(mat(i, j), j)); + if (i != j && mat(i, j) <= threshold) neighbors[i].push_back(std::make_pair(mat(i, j), j)); } value_t operator()(const index_t i, const index_t j) const; @@ -432,6 +432,7 @@ public: } diameter_entry_t next() { + ++ii[0]; while (k > 0 && get_next_vertex(max_vertex_below, idx_below, k, binomial_coeff) > get_index(x)) { idx_below -= binomial_coeff(max_vertex_below, k); |