summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2018-10-06 17:41:01 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2018-10-06 17:41:01 +0200
commitd3e1bae3779cfb500422b3018e098ebea089baa8 (patch)
treebfdc36289fae20b184121fad1969918ac93ffa62
parent2273fc17b34ad3efec7733febeb910ede6280b8e (diff)
removed use of std::unique
-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);
}