diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2020-07-11 12:36:51 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2020-07-11 12:36:51 +0200 |
commit | cad58d092409b6763b386a3916b59f2db28452c2 (patch) | |
tree | ff703cbc6fa75f3735c8c9bd54dd2486114f1075 | |
parent | 86ed81bc2eaecfba434986cd36936a5c67ea8a2c (diff) |
fix cofacet enumerator init
-rw-r--r-- | ripser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) { |