From 6af3c873fadc3eae10aa964dd0105ef095201911 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 6 Oct 2016 17:40:50 +0000 Subject: cpplint fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1668 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b24e2b03fc9a8898f5c3d6bf1cf36a2e60442673 --- src/Subsampling/include/gudhi/choose_n_farthest_points.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Subsampling') diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index 60816a29..40c7808d 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -66,7 +66,6 @@ void choose_n_farthest_points(Kernel const &k, assert(nb_points >= final_size); std::size_t current_number_of_landmarks = 0; // counter for landmarks - double curr_max_dist = 0; // used for defining the furhest point from L const double infty = std::numeric_limits::infinity(); // infinity (see next entry) std::vector< double > dist_to_L(nb_points, infty); // vector of current distances to L from input_pts @@ -75,7 +74,6 @@ void choose_n_farthest_points(Kernel const &k, for (current_number_of_landmarks = 0; current_number_of_landmarks != final_size; current_number_of_landmarks++) { // curr_max_w at this point is the next landmark *output_it++ = input_pts[curr_max_w]; - // std::cout << curr_max_w << "\n"; std::size_t i = 0; for (auto& p : input_pts) { double curr_dist = sqdist(p, *(std::begin(input_pts) + curr_max_w)); @@ -84,7 +82,7 @@ void choose_n_farthest_points(Kernel const &k, ++i; } // choose the next curr_max_w - curr_max_dist = 0; + double curr_max_dist = 0; // used for defining the furhest point from L for (i = 0; i < dist_to_L.size(); i++) if (dist_to_L[i] > curr_max_dist) { curr_max_dist = dist_to_L[i]; @@ -109,7 +107,7 @@ void choose_n_farthest_points(Kernel const& k, Point_container const &input_pts, unsigned final_size, OutputIterator output_it) { - // Choose randomly the first landmark + // Choose randomly the first landmark std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dis(1, 6); -- cgit v1.2.3