summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2020-07-11 12:36:51 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2020-07-11 12:36:51 +0200
commitcad58d092409b6763b386a3916b59f2db28452c2 (patch)
treeff703cbc6fa75f3735c8c9bd54dd2486114f1075
parent86ed81bc2eaecfba434986cd36936a5c67ea8a2c (diff)
fix cofacet enumerator init
-rw-r--r--ripser.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 3c91395..2452bfc 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -905,7 +905,13 @@ public:
k = _dim + 1;
vertices.resize(_dim + 1);
simplex = _simplex;
- parent.get_simplex_vertices(get_index(_simplex), _dim, parent.n, vertices.rbegin());
+ parent.get_simplex_vertices(idx_below, _dim, parent.n, vertices.rbegin());
+ neighbor_it.clear();
+ neighbor_end.clear();
+ for (auto v : vertices) {
+ neighbor_it.push_back(dist.neighbors[v].rbegin());
+ neighbor_end.push_back(dist.neighbors[v].rend());
+ }
}
bool has_next(bool all_cofacets = true) {