diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2018-10-06 17:41:01 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2018-10-06 17:41:01 +0200 |
commit | d3e1bae3779cfb500422b3018e098ebea089baa8 (patch) | |
tree | bfdc36289fae20b184121fad1969918ac93ffa62 | |
parent | 2273fc17b34ad3efec7733febeb910ede6280b8e (diff) |
removed use of std::unique
-rw-r--r-- | ripser.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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); } |