diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-11-20 22:01:19 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-11-20 22:01:19 +0000 |
commit | 975c40f92372948f11a7b1065a3944f737e550a9 (patch) | |
tree | 5dc051fb34389b2ff6d2e76a6d3825ec5cbc93e1 /src/Witness_complex/example | |
parent | 1b895dd0d76cbe13b92b68b7198f58631678200f (diff) | |
parent | dc231e43e7d741e5e477de23140bf3b8982489ab (diff) |
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/add_utils_in_gudhi_v2@2922 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 9ea024337f05cfc4f9a1d645c6e6ee9aac9700ba
Diffstat (limited to 'src/Witness_complex/example')
3 files changed, 12 insertions, 6 deletions
diff --git a/src/Witness_complex/example/example_strong_witness_complex_off.cpp b/src/Witness_complex/example/example_strong_witness_complex_off.cpp index 0ee9ee90..bc069654 100644 --- a/src/Witness_complex/example/example_strong_witness_complex_off.cpp +++ b/src/Witness_complex/example/example_strong_witness_complex_off.cpp @@ -23,6 +23,7 @@ #include <gudhi/Simplex_tree.h> #include <gudhi/Euclidean_strong_witness_complex.h> #include <gudhi/pick_n_random_points.h> +#include <gudhi/choose_n_farthest_points.h> #include <gudhi/Points_off_io.h> #include <CGAL/Epick_d.h> @@ -63,9 +64,10 @@ int main(int argc, char * const argv[]) { std::cout << "Successfully read " << point_vector.size() << " points.\n"; std::cout << "Ambient dimension is " << point_vector[0].dimension() << ".\n"; - // Choose landmarks - Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); - + // Choose landmarks (decomment one of the following two lines) + // Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, nbL, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); + // Compute witness complex start = clock(); Witness_complex witness_complex(landmarks, diff --git a/src/Witness_complex/example/example_witness_complex_off.cpp b/src/Witness_complex/example/example_witness_complex_off.cpp index b36dac0d..be11c955 100644 --- a/src/Witness_complex/example/example_witness_complex_off.cpp +++ b/src/Witness_complex/example/example_witness_complex_off.cpp @@ -4,6 +4,7 @@ #include <gudhi/Simplex_tree.h> #include <gudhi/Euclidean_witness_complex.h> #include <gudhi/pick_n_random_points.h> +#include <gudhi/choose_n_farthest_points.h> #include <gudhi/Points_off_io.h> #include <CGAL/Epick_d.h> @@ -44,8 +45,9 @@ int main(int argc, char * const argv[]) { std::cout << "Successfully read " << point_vector.size() << " points.\n"; std::cout << "Ambient dimension is " << point_vector[0].dimension() << ".\n"; - // Choose landmarks - Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); + // Choose landmarks (decomment one of the following two lines) + // Gudhi::subsampling::pick_n_random_points(point_vector, nbL, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, nbL, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); // Compute witness complex start = clock(); diff --git a/src/Witness_complex/example/example_witness_complex_sphere.cpp b/src/Witness_complex/example/example_witness_complex_sphere.cpp index 124fd99b..a66da3f9 100644 --- a/src/Witness_complex/example/example_witness_complex_sphere.cpp +++ b/src/Witness_complex/example/example_witness_complex_sphere.cpp @@ -25,6 +25,7 @@ #include <gudhi/Simplex_tree.h> #include <gudhi/Euclidean_witness_complex.h> #include <gudhi/pick_n_random_points.h> +#include <gudhi/choose_n_farthest_points.h> #include <gudhi/reader_utils.h> #include <CGAL/Epick_d.h> @@ -75,7 +76,8 @@ int main(int argc, char * const argv[]) { // Choose landmarks start = clock(); - Gudhi::subsampling::pick_n_random_points(point_vector, number_of_landmarks, std::back_inserter(landmarks)); + // Gudhi::subsampling::pick_n_random_points(point_vector, number_of_landmarks, std::back_inserter(landmarks)); + Gudhi::subsampling::choose_n_farthest_points(K(), point_vector, number_of_landmarks, Gudhi::subsampling::random_starting_point, std::back_inserter(landmarks)); // Compute witness complex Witness_complex witness_complex(landmarks, |