summaryrefslogtreecommitdiff
path: root/src/Subsampling/include/gudhi/choose_n_farthest_points.h
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 18:08:09 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-14 18:08:09 +0000
commit04f4501b35eaa2bd33393ef2445d038251ba1355 (patch)
treeb85b6cca1b28873c9289c1c904be5c1d5d5c0aa7 /src/Subsampling/include/gudhi/choose_n_farthest_points.h
parent9e8db290ff0b3f69f88fa5ed54482bfb6730ad9b (diff)
Added an example with a distance matrix for the farthest point algorithm
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1874 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 340e465189dc7ec8f8706e60e2d8097b53bfd5a0
Diffstat (limited to 'src/Subsampling/include/gudhi/choose_n_farthest_points.h')
-rw-r--r--src/Subsampling/include/gudhi/choose_n_farthest_points.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Subsampling/include/gudhi/choose_n_farthest_points.h b/src/Subsampling/include/gudhi/choose_n_farthest_points.h
index 43bf6402..b6b7ace3 100644
--- a/src/Subsampling/include/gudhi/choose_n_farthest_points.h
+++ b/src/Subsampling/include/gudhi/choose_n_farthest_points.h
@@ -52,6 +52,7 @@ namespace subsampling {
* 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>
* concept.
+ * It must also contain a public member 'squared_distance_d_object' of this type.
* \tparam Point_range Range whose value type is Kernel::Point_d. It must provide random-access
* via `operator[]` and the points should be stored contiguously in memory.
* \tparam OutputIterator Output iterator whose value type is Kernel::Point_d.
@@ -112,6 +113,7 @@ void choose_n_farthest_points(Kernel const &k,
* 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>
* concept.
+ * It must also contain a public member 'squared_distance_d_object' of this type.
* \tparam Point_range Range whose value type is Kernel::Point_d. It must provide random-access
* via `operator[]` and the points should be stored contiguously in memory.
* \tparam OutputIterator Output iterator whose value type is Kernel::Point_d.
@@ -133,7 +135,7 @@ void choose_n_farthest_points(Kernel const& k,
// Choose randomly the first landmark
std::random_device rd;
std::mt19937 gen(rd());
- std::uniform_int_distribution<> dis(1, 6);
+ std::uniform_int_distribution<> dis(0, final_size);
int starting_point = dis(gen);
choose_n_farthest_points(k, input_pts, final_size, starting_point, output_it);
}