Permalink
Browse files

removed use of std::unique

  • Loading branch information...
ubauer committed Oct 6, 2018
1 parent 2273fc1 commit d3e1bae3779cfb500422b3018e098ebea089baa8
Showing with 1 addition and 8 deletions.
  1. +1 −8 ripser.cpp
View
@@ -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);
}

0 comments on commit d3e1bae

Please sign in to comment.