diff options
-rw-r--r-- | src/Spatial_searching/include/gudhi/Kd_tree_search.h | 4 | ||||
-rw-r--r-- | src/Subsampling/include/gudhi/choose_n_farthest_points.h | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index ab266161..6728d56e 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -235,7 +235,7 @@ class Kd_tree_search { /// \brief Search incrementally for the farthest neighbors from a query point. /// @param[in] p The query point. /// @param[in] eps Approximation factor. - /// @return A range containing the neighbors sorted by their distance to p. + /// @return A range containing the neighbors sorted by their distance to p. /// All the neighbors are not computed by this function, but they will be /// computed incrementally when the iterator on the range is incremented. INS_range query_incremental_farthest_neighbors(const Point &p, FT eps = FT(0)) const { @@ -261,4 +261,4 @@ class Kd_tree_search { } // namespace spatial_searching } // namespace Gudhi -#endif // KD_TREE_SEARCH_H_ +#endif // KD_TREE_SEARCH_H_ 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<double>::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); |