summaryrefslogtreecommitdiff
path: root/src/Subsampling
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-27 15:49:37 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-27 15:49:37 +0000
commit732eb3a08d9a16e8e8ffd66ed76b99968d5cb06f (patch)
treea4252924ea1cb33f76a95b8ae3b3805ea7cc1a07 /src/Subsampling
parentd2e5de256424e824e9f54a6ae6c30cd06d8111d4 (diff)
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
Diffstat (limited to 'src/Subsampling')
-rw-r--r--src/Subsampling/example/example_choose_n_farthest_points.cpp2
-rw-r--r--src/Subsampling/example/example_custom_kernel.cpp2
-rw-r--r--src/Subsampling/include/gudhi/choose_n_farthest_points.h6
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());