diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2016-11-28 14:13:46 -0500 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2016-11-28 14:13:46 -0500 |
commit | 8521d24c4584a6eb1149a604309ffa987862414f (patch) | |
tree | 7f9cab24a82218119b9ca893af910bb104f3863c | |
parent | eb8c26dc3bad09678290c58d3637cb8336a37704 (diff) |
allow for negative edge filtration values
-rw-r--r-- | ripser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -403,7 +403,7 @@ public: } value_t compute_diameter(const index_t index, index_t dim) const { - value_t diam = 0; + value_t diam = -std::numeric_limits<value_t>::infinity(); vertices.clear(); get_simplex_vertices(index, dim, dist.size(), std::back_inserter(vertices)); @@ -682,7 +682,7 @@ public: if (u != v) { #ifdef PRINT_PERSISTENCE_PAIRS - if (get_diameter(e) > 0) std::cout << " [0," << get_diameter(e) << ")" << std::endl; + if (get_diameter(e) != 0) std::cout << " [0," << get_diameter(e) << ")" << std::endl; #endif dset.link(u, v); } else |