summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2017-06-21 21:28:42 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2017-06-21 21:28:42 +0200
commit97966f3580173172a5d42fe6c493ae03d1dedf64 (patch)
tree850d5ae383d8cab92e3062548d91b78bd335d556
parentc551fd32c8f67d62804a1ac925af9ea5e3479a9f (diff)
post merge fix: added back vertices_of_simplex
-rw-r--r--ripser.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ripser.cpp b/ripser.cpp
index eb7281c..cd8f83b 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -424,6 +424,13 @@ public:
}
return out;
}
+
+ std::vector<index_t> vertices_of_simplex(const index_t simplex_index, const index_t dim) {
+ std::vector<index_t> vertices(dim + 1);
+ get_simplex_vertices(simplex_index, dim, n,
+ vertices.begin());
+ return vertices;
+ }
value_t compute_diameter(const index_t index, index_t dim) const {
value_t diam = -std::numeric_limits<value_t>::infinity();
@@ -643,7 +650,7 @@ public:
auto cocycle = reduction_column;
diameter_entry_t e;
while (get_index(e = get_pivot(cocycle, modulus)) != -1) {
- std::cout << vertices_of_simplex(get_index(pivot), dim, n, binomial_coeff) << ":" << normalize(get_coefficient(e), modulus);
+ std::cout << vertices_of_simplex(get_index(pivot), dim) << ":" << normalize(get_coefficient(e), modulus);
cocycle.pop();
if (get_index(pivot = get_pivot(cocycle, modulus)) != -1) std::cout << ", ";
}
@@ -664,7 +671,7 @@ public:
auto cocycle = reduction_column;
diameter_entry_t e;
while (get_index(e = get_pivot(cocycle, modulus)) != -1) {
- std::cout << vertices_of_simplex(get_index(e), dim, n, binomial_coeff) << ":" << normalize(get_coefficient(e), modulus);
+ std::cout << vertices_of_simplex(get_index(e), dim) << ":" << normalize(get_coefficient(e), modulus);
cocycle.pop();
if (get_index(e = get_pivot(cocycle, modulus)) != -1) std::cout << ", ";
}