diff options
author | Gard Spreemann <gspr@nonempty.org> | 2020-12-16 15:15:38 +0100 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2020-12-16 15:15:38 +0100 |
commit | b6a3def70b15baf2dda0844762dcd291e240d2c1 (patch) | |
tree | df4d6b690d0fc7f46d259364fe4a6fcc85f62b40 /src/python/include/Subsampling_interface.h | |
parent | 1c05c20d7cf92c96b5036620cc892cb956c96785 (diff) | |
parent | cf36a3971fb6a0ed37577295d7f1f13a930d1dba (diff) |
Merge tag 'tags/gudhi-release-3.4.0' into dfsg/latest
Diffstat (limited to 'src/python/include/Subsampling_interface.h')
-rw-r--r-- | src/python/include/Subsampling_interface.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/include/Subsampling_interface.h b/src/python/include/Subsampling_interface.h index cdda851f..6aee7231 100644 --- a/src/python/include/Subsampling_interface.h +++ b/src/python/include/Subsampling_interface.h @@ -11,6 +11,7 @@ #ifndef INCLUDE_SUBSAMPLING_INTERFACE_H_ #define INCLUDE_SUBSAMPLING_INTERFACE_H_ +#include <gudhi/distance_functions.h> #include <gudhi/choose_n_farthest_points.h> #include <gudhi/pick_n_random_points.h> #include <gudhi/sparsify_point_set.h> @@ -27,14 +28,13 @@ namespace subsampling { using Subsampling_dynamic_kernel = CGAL::Epick_d< CGAL::Dynamic_dimension_tag >; using Subsampling_point_d = Subsampling_dynamic_kernel::Point_d; -using Subsampling_ft = Subsampling_dynamic_kernel::FT; // ------ choose_n_farthest_points ------ std::vector<std::vector<double>> subsampling_n_farthest_points(const std::vector<std::vector<double>>& points, unsigned nb_points) { std::vector<std::vector<double>> landmarks; - Subsampling_dynamic_kernel k; - choose_n_farthest_points(k, points, nb_points, random_starting_point, std::back_inserter(landmarks)); + choose_n_farthest_points(Euclidean_distance(), points, nb_points, + random_starting_point, std::back_inserter(landmarks)); return landmarks; } @@ -42,8 +42,8 @@ std::vector<std::vector<double>> subsampling_n_farthest_points(const std::vector std::vector<std::vector<double>> subsampling_n_farthest_points(const std::vector<std::vector<double>>& points, unsigned nb_points, unsigned starting_point) { std::vector<std::vector<double>> landmarks; - Subsampling_dynamic_kernel k; - choose_n_farthest_points(k, points, nb_points, starting_point, std::back_inserter(landmarks)); + choose_n_farthest_points(Euclidean_distance(), points, nb_points, + starting_point, std::back_inserter(landmarks)); return landmarks; } |