summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ripser.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 7fe1a4b..85c65e1 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -1019,16 +1019,9 @@ sparse_distance_matrix read_sparse_distance_matrix(std::istream& input_stream) {
}
}
- for (index_t i = 0; i < neighbors.size(); ++i) {
+ for (index_t i = 0; i < neighbors.size(); ++i)
std::sort(neighbors[i].begin(), neighbors[i].end());
- auto last = std::unique(neighbors[i].begin(), neighbors[i].end(),
- [](const index_diameter_t& x, const index_diameter_t& y) {
- return get_index(x) == get_index(y);
- });
- neighbors[i].erase(last, neighbors[i].end());
- }
-
return sparse_distance_matrix(std::move(neighbors), num_edges);
}