diff options
Diffstat (limited to 'src/Subsampling')
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Subsampling/example/example_choose_n_farthest_points.cpp b/src/Subsampling/example/example_choose_n_farthest_points.cpp index adbd2b80..fc9ea7a6 100644 --- a/src/Subsampling/example/example_choose_n_farthest_points.cpp +++ b/src/Subsampling/example/example_choose_n_farthest_points.cpp @@ -19,7 +19,7 @@ int main(void) { K k; std::vector<Point_d> results; - Gudhi::subsampling::choose_n_farthest_points(k, points, 100, Gudhi::subsampling::random_first_landmark, std::back_inserter(results)); + Gudhi::subsampling::choose_n_farthest_points(k, points, 100, Gudhi::subsampling::random_starting_point, std::back_inserter(results)); std::cout << "Before sparsification: " << points.size() << " points.\n"; std::cout << "After sparsification: " << results.size() << " points.\n"; diff --git a/src/Subsampling/example/example_custom_kernel.cpp b/src/Subsampling/example/example_custom_kernel.cpp index 935ba885..2719ee90 100644 --- a/src/Subsampling/example/example_custom_kernel.cpp +++ b/src/Subsampling/example/example_custom_kernel.cpp @@ -54,7 +54,7 @@ int main(void) { std::vector<Point_d> points = {0, 1, 2, 3}; std::vector<Point_d> results; - Gudhi::subsampling::choose_n_farthest_points(k, points, 2, Gudhi::subsampling::random_first_landmark, std::back_inserter(results)); + Gudhi::subsampling::choose_n_farthest_points(k, points, 2, Gudhi::subsampling::random_starting_point, std::back_inserter(results)); std::cout << "Before sparsification: " << points.size() << " points.\n"; std::cout << "After sparsification: " << results.size() << " points.\n"; std::cout << "Result table: {" << results[0] << "," << results[1] << "}\n"; diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h index 02376c03..1d2338cb 100644 --- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h +++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h @@ -43,14 +43,14 @@ enum : std::size_t { /** * Argument for `choose_n_farthest_points` to indicate that the starting point should be picked randomly. */ - random_first_landmark = std::size_t(-1) + random_starting_point = std::size_t(-1) }; /** * \ingroup subsampling * \brief Subsample by a greedy strategy of iteratively adding the farthest point from the * current chosen point set to the subsampling. - * The iteration starts with the landmark `starting point` or, if `starting point==random_first_landmark`, with a random landmark. + * The iteration starts with the landmark `starting point` or, if `starting point==random_starting_point`, with a random landmark. * \tparam Kernel must provide a type Kernel::Squared_distance_d which is a model of the * concept <a target="_blank" * href="http://doc.cgal.org/latest/Kernel_d/classKernel__d_1_1Squared__distance__d.html">Kernel_d::Squared_distance_d</a> @@ -90,7 +90,7 @@ void choose_n_farthest_points(Kernel const &k, if (final_size < 1) return; - if (starting_point == random_first_landmark) { + if (starting_point == random_starting_point) { // Choose randomly the first landmark std::random_device rd; std::mt19937 gen(rd()); |