diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-10-31 23:39:01 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-10-31 23:39:01 +0100 |
commit | 2bbba93e7f0837b42def9bed13a6fa790c0eabda (patch) | |
tree | edb3cd03abdb956117b25413f7c6eb9bbb0b28a9 /src/Rips_complex/include | |
parent | 6b995c03793096459a333c907b606770113b96d7 (diff) |
s/kernel/distance/ for choose_n_farthest_points argument
Diffstat (limited to 'src/Rips_complex/include')
-rw-r--r-- | src/Rips_complex/include/gudhi/Sparse_rips_complex.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 1b250818..a5501004 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -67,8 +67,7 @@ class Sparse_rips_complex { : epsilon_(epsilon) { GUDHI_CHECK(epsilon > 0, "epsilon must be positive"); auto dist_fun = [&](Vertex_handle i, Vertex_handle j) { return distance(points[i], points[j]); }; - Ker<decltype(dist_fun)> kernel(dist_fun); - subsampling::choose_n_farthest_points(kernel, boost::irange<Vertex_handle>(0, boost::size(points)), -1, -1, + subsampling::choose_n_farthest_points(dist_fun, boost::irange<Vertex_handle>(0, boost::size(points)), -1, -1, std::back_inserter(sorted_points), std::back_inserter(params)); compute_sparse_graph(dist_fun, epsilon, mini, maxi); } @@ -128,17 +127,6 @@ class Sparse_rips_complex { } private: - // choose_n_farthest_points wants the distance function in this form... - template <class Distance> - struct Ker { - typedef std::size_t Point_d; // index into point range - Ker(Distance& d) : dist(d) {} - // Despite the name, this is not squared... - typedef Distance Squared_distance_d; - Squared_distance_d& squared_distance_d_object() const { return dist; } - Distance& dist; - }; - // PointRange must be random access. template <typename Distance> void compute_sparse_graph(Distance& dist, double epsilon, Filtration_value mini, Filtration_value maxi) { |