From 9899ae167f281d10b1684dfcd02c6838c5bf28df Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Fri, 2 Feb 2018 13:51:45 +0100 Subject: GUDHI 2.1.0 as released by upstream in a tarball. --- include/gudhi/choose_n_farthest_points.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/gudhi/choose_n_farthest_points.h') diff --git a/include/gudhi/choose_n_farthest_points.h b/include/gudhi/choose_n_farthest_points.h index 86500b28..8390b4c9 100644 --- a/include/gudhi/choose_n_farthest_points.h +++ b/include/gudhi/choose_n_farthest_points.h @@ -93,7 +93,7 @@ void choose_n_farthest_points(Kernel const &k, // Choose randomly the first landmark std::random_device rd; std::mt19937 gen(rd()); - std::uniform_int_distribution dis(0, (input_pts.size() - 1)); + std::uniform_int_distribution dis(0, nb_points - 1); starting_point = dis(gen); } @@ -110,7 +110,7 @@ void choose_n_farthest_points(Kernel const &k, *output_it++ = input_pts[curr_max_w]; *dist_it++ = dist_to_L[curr_max_w]; std::size_t i = 0; - for (auto& p : input_pts) { + for (auto&& p : input_pts) { double curr_dist = sqdist(p, *(std::begin(input_pts) + curr_max_w)); if (curr_dist < dist_to_L[i]) dist_to_L[i] = curr_dist; -- cgit v1.2.3