summaryrefslogtreecommitdiff
path: root/ripser.cpp
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2016-09-20 09:35:45 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2016-09-20 09:35:45 +0200
commit42a60a47c9bf12c5249fdea9b354fe352170950f (patch)
tree4dff2d27736fc7b7abb5754df8aca8c53300e890 /ripser.cpp
parentad46246d05aaef70d523b96d483e5a6407404cb1 (diff)
bug fix in sparse coboundary enumerator
Diffstat (limited to 'ripser.cpp')
-rw-r--r--ripser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 1405865..e16679c 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -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);