diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-18 13:18:21 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-18 13:18:21 +0000 |
commit | 6f223e2ca823025c01db80fcab96b86a052419b6 (patch) | |
tree | 4a267378e2cb20b00548f2f666e7f8b3a48724d6 | |
parent | 7f7aac2010f5cda05dfd1057827d8deaea186cf5 (diff) | |
parent | daef9dbdbb63d8a0c463efd592fbd8e71b2d448e (diff) |
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cythonization_improvement@2679 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: e4d0575f2279f2541329644c177c05c40614b761
-rw-r--r-- | src/Spatial_searching/doc/Intro_spatial_searching.h | 2 | ||||
-rw-r--r-- | src/Spatial_searching/example/example_spatial_searching.cpp | 6 | ||||
-rw-r--r-- | src/Spatial_searching/include/gudhi/Kd_tree_search.h | 2 | ||||
-rw-r--r-- | src/Spatial_searching/test/test_Kd_tree_search.cpp | 4 | ||||
-rw-r--r-- | src/cython/cython/simplex_tree.pyx | 1 | ||||
-rw-r--r-- | src/cython/doc/alpha_complex_user.rst | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/src/Spatial_searching/doc/Intro_spatial_searching.h b/src/Spatial_searching/doc/Intro_spatial_searching.h index 9a3c1b65..22652ac4 100644 --- a/src/Spatial_searching/doc/Intro_spatial_searching.h +++ b/src/Spatial_searching/doc/Intro_spatial_searching.h @@ -46,7 +46,7 @@ namespace spatial_searching { * * \section spatial_searching_examples Example * - * This example generates 500 random points, then performs radius search, and queries for nearest and farthest points using different methods. + * This example generates 500 random points, then performs near search, and queries for nearest and farthest points using different methods. * * \include Spatial_searching/example_spatial_searching.cpp * diff --git a/src/Spatial_searching/example/example_spatial_searching.cpp b/src/Spatial_searching/example/example_spatial_searching.cpp index 9e6a8f32..201b589e 100644 --- a/src/Spatial_searching/example/example_spatial_searching.cpp +++ b/src/Spatial_searching/example/example_spatial_searching.cpp @@ -48,10 +48,10 @@ int main(void) { for (auto ifs_iterator = ifn_range.begin(); ifs_iterator->first != 0; ++ifs_iterator) std::cout << ifs_iterator->first << " (sq. dist. = " << ifs_iterator->second << ")\n"; - // Radius search - std::cout << "Radius search:\n"; + // Near search + std::cout << "Near search:\n"; std::vector<std::size_t> rs_result; - points_ds.radius_search(points[45], 0.5, std::back_inserter(rs_result)); + points_ds.near_search(points[45], 0.5, std::back_inserter(rs_result)); K k; for (auto const& p_idx : rs_result) std::cout << p_idx << " (sq. dist. = " << k.squared_distance_d_object()(points[p_idx], points[45]) << ")\n"; diff --git a/src/Spatial_searching/include/gudhi/Kd_tree_search.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h index f13a98f7..a4385c84 100644 --- a/src/Spatial_searching/include/gudhi/Kd_tree_search.h +++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h @@ -264,7 +264,7 @@ class Kd_tree_search { /// Note: `it` is used this way: `*it++ = each_point`. /// @param[in] eps Approximation factor. template <typename OutputIterator> - void radius_search( + void near_search( Point const& p, FT radius, OutputIterator it, diff --git a/src/Spatial_searching/test/test_Kd_tree_search.cpp b/src/Spatial_searching/test/test_Kd_tree_search.cpp index f79114bc..663a103a 100644 --- a/src/Spatial_searching/test/test_Kd_tree_search.cpp +++ b/src/Spatial_searching/test/test_Kd_tree_search.cpp @@ -110,10 +110,10 @@ BOOST_AUTO_TEST_CASE(test_Kd_tree_search) { // Same result for KFN and IFN? BOOST_CHECK(kfn_result == ifn_result); - // Test radius search + // Test near search Point rs_q(rd.get_double(-1., 1), rd.get_double(-1., 1), rd.get_double(-1., 1), rd.get_double(-1., 1)); std::vector<std::size_t> rs_result; - points_ds.radius_search(rs_q, 0.5, std::back_inserter(rs_result)); + points_ds.near_search(rs_q, 0.5, std::back_inserter(rs_result)); K k; for (auto const& p_idx : rs_result) BOOST_CHECK(k.squared_distance_d_object()(points[p_idx], rs_q) <= 0.5); diff --git a/src/cython/cython/simplex_tree.pyx b/src/cython/cython/simplex_tree.pyx index 9e3b2345..47aa5311 100644 --- a/src/cython/cython/simplex_tree.pyx +++ b/src/cython/cython/simplex_tree.pyx @@ -2,6 +2,7 @@ from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair from libcpp cimport bool +from libcpp.string cimport string """This file is part of the Gudhi Library. The Gudhi library (Geometric Understanding in Higher Dimensions) is a generic C++ diff --git a/src/cython/doc/alpha_complex_user.rst b/src/cython/doc/alpha_complex_user.rst index c3a13bef..db7edd6f 100644 --- a/src/cython/doc/alpha_complex_user.rst +++ b/src/cython/doc/alpha_complex_user.rst @@ -142,7 +142,7 @@ Prune above given filtration value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The simplex tree is pruned from the given maximum alpha squared value (cf. `Simplex_tree::prune_above_filtration()` -int he `C++ version <http://gudhi.gforge.inria.fr/doc/latest/index.html>`_). +in the `C++ version <http://gudhi.gforge.inria.fr/doc/latest/index.html>`_). In the following example, the value is given by the user as argument of the program. |