diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-10-22 22:27:10 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-10-22 22:45:10 +0200 |
commit | 8aea376ed0b3c9066fb7e649f1cd66ffbed99a8d (patch) | |
tree | 976c475a0b3050749b56ee2d6066bac9768c6fd6 /src/Subsampling/include | |
parent | dda7885005c343601c6630796eb56bdcf91a559f (diff) |
Simplify strange iterator use
the syntax with [] is already used a few lines above
Diffstat (limited to 'src/Subsampling/include')
-rw-r--r-- | src/Subsampling/include/gudhi/choose_n_farthest_points.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index 0e13fc5a..b70af8a0 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -100,7 +100,7 @@ void choose_n_farthest_points(Kernel const &k, *dist_it++ = dist_to_L[curr_max_w]; std::size_t i = 0; for (auto&& p : input_pts) { - double curr_dist = sqdist(p, *(std::begin(input_pts) + curr_max_w)); + double curr_dist = sqdist(p, input_pts[curr_max_w]); if (curr_dist < dist_to_L[i]) dist_to_L[i] = curr_dist; ++i; |