From 732eb3a08d9a16e8e8ffd66ed76b99968d5cb06f Mon Sep 17 00:00:00 2001 From: glisse Date: Mon, 27 Mar 2017 15:49:37 +0000 Subject: Rename random_first_landmark to random_starting_point. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/farthest_distance@2250 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 953403f208094ca4145d837f736bfc939efa9223 --- src/Subsampling/example/example_choose_n_farthest_points.cpp | 2 +- src/Subsampling/example/example_custom_kernel.cpp | 2 +- src/Subsampling/include/gudhi/choose_n_farthest_points.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Subsampling') 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 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 points = {0, 1, 2, 3}; std::vector 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 Kernel_d::Squared_distance_d @@ -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()); -- cgit v1.2.3