summaryrefslogtreecommitdiff
path: root/src/Spatial_searching
diff options
context:
space:
mode:
authorcjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-22 13:35:38 +0000
committercjamin <cjamin@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-09-22 13:35:38 +0000
commit3d2205afe247f23cbe69b98845569708b4263f02 (patch)
treeb507f34ce178bbe8bc994fb01587ad5852a46414 /src/Spatial_searching
parentaa994dbd8dadfd4be416f13b13721e7e13c3623a (diff)
Spatial_tree_data_structure => Kd_tree_search
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/subsampling_and_spatialsearching@1538 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 095b038d0e4c1c6d78e9aa9efe73447b65dab2b1
Diffstat (limited to 'src/Spatial_searching')
-rw-r--r--src/Spatial_searching/example/example_spatial_searching.cpp4
-rw-r--r--src/Spatial_searching/include/gudhi/Kd_tree_search.h (renamed from src/Spatial_searching/include/gudhi/Spatial_tree_data_structure.h)12
-rw-r--r--src/Spatial_searching/test/CMakeLists.txt4
-rw-r--r--src/Spatial_searching/test/test_Kd_tree_search.cpp (renamed from src/Spatial_searching/test/test_Spatial_tree_data_structure.cpp)8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/Spatial_searching/example/example_spatial_searching.cpp b/src/Spatial_searching/example/example_spatial_searching.cpp
index ba2ea25f..7b48d055 100644
--- a/src/Spatial_searching/example/example_spatial_searching.cpp
+++ b/src/Spatial_searching/example/example_spatial_searching.cpp
@@ -1,4 +1,4 @@
-#include <gudhi/Spatial_tree_data_structure.h>
+#include <gudhi/Kd_tree_search.h>
#include <CGAL/Epick_d.h>
#include <CGAL/Random.h>
@@ -14,7 +14,7 @@ int main (void)
typedef typename K::Point_d Point;
typedef std::vector<Point> Points;
- typedef gss::Spatial_tree_data_structure<K, Points> Points_ds;
+ typedef gss::Kd_tree_search<K, Points> Points_ds;
CGAL::Random rd;
diff --git a/src/Spatial_searching/include/gudhi/Spatial_tree_data_structure.h b/src/Spatial_searching/include/gudhi/Kd_tree_search.h
index 68702b22..af85915a 100644
--- a/src/Spatial_searching/include/gudhi/Spatial_tree_data_structure.h
+++ b/src/Spatial_searching/include/gudhi/Kd_tree_search.h
@@ -40,13 +40,13 @@ namespace spatial_searching {
/**
- * \class Spatial_tree_data_structure Spatial_tree_data_structure.h gudhi/Spatial_tree_data_structure.h
+ * \class Kd_tree_search Kd_tree_search.h gudhi/Kd_tree_search.h
* \brief Spatial tree data structure to perform (approximate) nearest neighbor search.
*
* \ingroup spatial_searching
*
* \details
- * The class Spatial_tree_data_structure is a tree-based data structure, based on
+ * The class Kd_tree_search is a tree-based data structure, based on
* <a target="_blank" href="http://doc.cgal.org/latest/Spatial_searching/index.html">CGAL dD spatial searching data structures</a>.
* It provides a simplified API to perform (approximate) nearest neighbor searches. Contrary to CGAL default behavior, the tree
* does not store the points themselves, but stores indices.
@@ -65,7 +65,7 @@ namespace spatial_searching {
* It must be a range whose iterator type is a `RandomAccessIterator`.
*/
template <typename K, typename Point_range>
-class Spatial_tree_data_structure
+class Kd_tree_search
{
typedef boost::iterator_property_map<
typename Point_range::const_iterator,
@@ -108,7 +108,7 @@ public:
/// \brief Constructor
/// @param[in] points Const reference to the point range. This range
/// is not copied, so it should not be destroyed or modified afterwards.
- Spatial_tree_data_structure(Point_range const& points)
+ Kd_tree_search(Point_range const& points)
: m_points(points),
m_tree(boost::counting_iterator<std::ptrdiff_t>(0),
boost::counting_iterator<std::ptrdiff_t>(points.size()),
@@ -125,7 +125,7 @@ public:
/// @param[in] only_these_points Specifies the indices of the points that
/// should be actually inserted into the tree. The other points are ignored.
template <typename Point_indices_range>
- Spatial_tree_data_structure(
+ Kd_tree_search(
Point_range const& points,
Point_indices_range const& only_these_points)
: m_points(points),
@@ -143,7 +143,7 @@ public:
/// is not copied, so it should not be destroyed or modified afterwards.
/// @param[in] begin_idx, past_the_end_idx Define the subset of the points that
/// should be actually inserted into the tree. The other points are ignored.
- Spatial_tree_data_structure(
+ Kd_tree_search(
Point_range const& points,
std::size_t begin_idx, std::size_t past_the_end_idx)
: m_points(points),
diff --git a/src/Spatial_searching/test/CMakeLists.txt b/src/Spatial_searching/test/CMakeLists.txt
index 82c38ca5..ed61cc64 100644
--- a/src/Spatial_searching/test/CMakeLists.txt
+++ b/src/Spatial_searching/test/CMakeLists.txt
@@ -20,8 +20,8 @@ if(CGAL_FOUND)
include( ${EIGEN3_USE_FILE} )
include_directories (BEFORE "../../include")
- add_executable( Spatial_searching_test_Spatial_tree_data_structure test_Spatial_tree_data_structure.cpp )
- target_link_libraries(Spatial_searching_test_Spatial_tree_data_structure
+ add_executable( Spatial_searching_test_Kd_tree_search test_Kd_tree_search.cpp )
+ target_link_libraries(Spatial_searching_test_Kd_tree_search
${CGAL_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
else()
message(WARNING "Eigen3 not found. Version 3.1.0 is required for the Spatial_searching tests.")
diff --git a/src/Spatial_searching/test/test_Spatial_tree_data_structure.cpp b/src/Spatial_searching/test/test_Kd_tree_search.cpp
index af321919..6f99b288 100644
--- a/src/Spatial_searching/test/test_Spatial_tree_data_structure.cpp
+++ b/src/Spatial_searching/test/test_Kd_tree_search.cpp
@@ -21,10 +21,10 @@
*/
#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MODULE Spatial_searching - test Spatial_tree_data_structure
+#define BOOST_TEST_MODULE Spatial_searching - test Kd_tree_search
#include <boost/test/unit_test.hpp>
-#include <gudhi/Spatial_tree_data_structure.h>
+#include <gudhi/Kd_tree_search.h>
#include <CGAL/Epick_d.h>
#include <CGAL/Random.h>
@@ -32,14 +32,14 @@
#include <array>
#include <vector>
-BOOST_AUTO_TEST_CASE(test_Spatial_tree_data_structure)
+BOOST_AUTO_TEST_CASE(test_Kd_tree_search)
{
typedef CGAL::Epick_d<CGAL::Dimension_tag<4> > K;
typedef K::FT FT;
typedef K::Point_d Point;
typedef std::vector<Point> Points;
- typedef Gudhi::spatial_searching::Spatial_tree_data_structure<
+ typedef Gudhi::spatial_searching::Kd_tree_search<
K, Points> Points_ds;
CGAL::Random rd;