From 6e1347948166711dd718246e99329c3b073f0fbb Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Wed, 21 Nov 2012 16:06:34 +0000
Subject: [PATCH 01/10] docs fixed
[SVN r81459]
---
doc/html/geometry_index/r_tree/spatial_queries.html | 12 ++++++------
doc/html/index.html | 2 +-
doc/rtree/spatial_query.qbk | 12 ++++++------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/doc/html/geometry_index/r_tree/spatial_queries.html b/doc/html/geometry_index/r_tree/spatial_queries.html
index 0262793d6..910bf2c5b 100644
--- a/doc/html/geometry_index/r_tree/spatial_queries.html
+++ b/doc/html/geometry_index/r_tree/spatial_queries.html
@@ -74,12 +74,12 @@
of Boost.Geometry
algorithms.
-rt . query ( box , std :: back_inserter ( result ));
-rt . query ( index :: intersects ( box ), std :: back_inserter ( result ));
-rt . query ( index :: covered_by ( box ), std :: back_inserter ( result ));
-rt . query ( index :: disjont ( box ), std :: back_inserter ( result ));
-rt . query ( index :: overlaps ( box ), std :: back_inserter ( result ));
-rt . query ( index :: within ( box ), std :: back_inserter ( result ));
+rt . spatial_query ( box , std :: back_inserter ( result ));
+rt . spatial_query ( index :: intersects ( box ), std :: back_inserter ( result ));
+rt . spatial_query ( index :: covered_by ( box ), std :: back_inserter ( result ));
+rt . spatial_query ( index :: disjont ( box ), std :: back_inserter ( result ));
+rt . spatial_query ( index :: overlaps ( box ), std :: back_inserter ( result ));
+rt . spatial_query ( index :: within ( box ), std :: back_inserter ( result ));
All predicates may be negated, e.g.:
diff --git a/doc/html/index.html b/doc/html/index.html
index 6ffb17abf..034989275 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -56,7 +56,7 @@
-Last revised: November 20, 2012 at 22:42:04 GMT
+Last revised: November 21, 2012 at 16:05:59 GMT
diff --git a/doc/rtree/spatial_query.qbk b/doc/rtree/spatial_query.qbk
index dbd7cd55a..6013a73fc 100644
--- a/doc/rtree/spatial_query.qbk
+++ b/doc/rtree/spatial_query.qbk
@@ -39,12 +39,12 @@ Use of pipe operator generating a range
It is possible to define other relations between queried `__value__`s and region/regions
of interest. Names of predicates corresponds to names of __boost_geometry__ algorithms.
- rt.query(box, std::back_inserter(result)); // default case - intersects
- rt.query(index::intersects(box), std::back_inserter(result)); // the same as default
- rt.query(index::covered_by(box), std::back_inserter(result));
- rt.query(index::disjont(box), std::back_inserter(result));
- rt.query(index::overlaps(box), std::back_inserter(result));
- rt.query(index::within(box), std::back_inserter(result));
+ rt.spatial_query(box, std::back_inserter(result)); // default case - intersects
+ rt.spatial_query(index::intersects(box), std::back_inserter(result)); // the same as default
+ rt.spatial_query(index::covered_by(box), std::back_inserter(result));
+ rt.spatial_query(index::disjont(box), std::back_inserter(result));
+ rt.spatial_query(index::overlaps(box), std::back_inserter(result));
+ rt.spatial_query(index::within(box), std::back_inserter(result));
All predicates may be negated, e.g.:
From b42b3e3c9f681b358d765410c66caae366499979 Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Thu, 22 Nov 2012 01:54:21 +0000
Subject: [PATCH 02/10] nearest and query visitors renamed.
[SVN r81471]
---
.../geometry/extensions/index/rtree/rtree.hpp | 14 ++++++-------
.../{nearest.hpp => nearest_query.hpp} | 20 +++++++++----------
.../visitors/{query.hpp => spatial_query.hpp} | 12 +++++------
3 files changed, 23 insertions(+), 23 deletions(-)
rename include/boost/geometry/extensions/index/rtree/visitors/{nearest.hpp => nearest_query.hpp} (95%)
rename include/boost/geometry/extensions/index/rtree/visitors/{query.hpp => spatial_query.hpp} (87%)
diff --git a/include/boost/geometry/extensions/index/rtree/rtree.hpp b/include/boost/geometry/extensions/index/rtree/rtree.hpp
index 8020cdaf5..0c75c9b18 100644
--- a/include/boost/geometry/extensions/index/rtree/rtree.hpp
+++ b/include/boost/geometry/extensions/index/rtree/rtree.hpp
@@ -36,8 +36,8 @@
#include
#include
#include
-#include
-#include
+#include
+#include
#include
#include
@@ -346,7 +346,7 @@ public:
template
inline size_type spatial_query(Predicates const& pred, OutIter out_it) const
{
- detail::rtree::visitors::query
+ detail::rtree::visitors::spatial_query
find_v(m_translator, pred, out_it);
detail::rtree::apply_visitor(find_v, *m_root);
@@ -749,7 +749,7 @@ private:
typedef typename detail::point_relation::type point_relation;
typedef typename detail::relation::value_type point_type;
- typedef detail::rtree::visitors::nearest_one<
+ typedef detail::rtree::visitors::nearest_query_result_one<
value_type,
translator_type,
point_type
@@ -757,7 +757,7 @@ private:
result_type result;
- detail::rtree::visitors::nearest<
+ detail::rtree::visitors::nearest_query<
value_type,
options_type,
translator_type,
@@ -784,7 +784,7 @@ private:
typedef typename detail::point_relation::type point_relation;
typedef typename detail::relation::value_type point_type;
- typedef detail::rtree::visitors::nearest_k<
+ typedef detail::rtree::visitors::nearest_query_result_k<
value_type,
translator_type,
point_type
@@ -792,7 +792,7 @@ private:
result_type result(k);
- detail::rtree::visitors::nearest<
+ detail::rtree::visitors::nearest_query<
value_type,
options_type,
translator_type,
diff --git a/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp b/include/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp
similarity index 95%
rename from include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp
rename to include/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp
index f11d64f4b..54b81d8bf 100644
--- a/include/boost/geometry/extensions/index/rtree/visitors/nearest.hpp
+++ b/include/boost/geometry/extensions/index/rtree/visitors/nearest_query.hpp
@@ -1,6 +1,6 @@
// Boost.Geometry Index
//
-// R-tree k nearest neighbour querying visitor implementation
+// R-tree k nearest neighbour query visitor implementation
//
// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
//
@@ -8,8 +8,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP
#include
@@ -25,7 +25,7 @@ namespace detail { namespace rtree { namespace visitors {
// - well not with this algorithm of storing k-th neighbor
template
-struct nearest_one
+struct nearest_query_result_one
{
public:
typedef typename geometry::default_distance_result<
@@ -33,7 +33,7 @@ public:
typename translator::indexable_type::type
>::type distance_type;
- inline nearest_one()
+ inline nearest_query_result_one()
: m_comp_dist((std::numeric_limits::max)())
{}
@@ -68,7 +68,7 @@ private:
};
template
-struct nearest_k
+struct nearest_query_result_k
{
public:
typedef typename geometry::default_distance_result<
@@ -76,7 +76,7 @@ public:
typename translator::indexable_type::type
>::type distance_type;
- inline explicit nearest_k(size_t k)
+ inline explicit nearest_query_result_k(size_t k)
: m_count(k)
{
BOOST_GEOMETRY_INDEX_ASSERT(0 < m_count, "Number of neighbors should be greater than 0");
@@ -156,7 +156,7 @@ template <
typename Predicates,
typename Result
>
-class nearest
+class nearest_query
: public rtree::visitor::type
, index::nonassignable
{
@@ -183,7 +183,7 @@ public:
rtree::value_tag
> value_distances_predicates_check;
- inline nearest(parameters_type const& parameters, Translator const& translator, DistancesPredicates const& dist_pred, Predicates const& pred, Result & r)
+ inline nearest_query(parameters_type const& parameters, Translator const& translator, DistancesPredicates const& dist_pred, Predicates const& pred, Result & r)
: m_parameters(parameters), m_translator(translator)
, m_dist_pred(dist_pred), m_pred(pred)
, m_result(r)
@@ -337,4 +337,4 @@ private:
}}} // namespace boost::geometry::index
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP
diff --git a/include/boost/geometry/extensions/index/rtree/visitors/query.hpp b/include/boost/geometry/extensions/index/rtree/visitors/spatial_query.hpp
similarity index 87%
rename from include/boost/geometry/extensions/index/rtree/visitors/query.hpp
rename to include/boost/geometry/extensions/index/rtree/visitors/spatial_query.hpp
index 689e525aa..10926f2f2 100644
--- a/include/boost/geometry/extensions/index/rtree/visitors/query.hpp
+++ b/include/boost/geometry/extensions/index/rtree/visitors/spatial_query.hpp
@@ -1,6 +1,6 @@
// Boost.Geometry Index
//
-// R-tree querying visitor implementation
+// R-tree spatial query visitor implementation
//
// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
//
@@ -8,8 +8,8 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_QUERY_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_QUERY_HPP
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP
#include
@@ -20,7 +20,7 @@ namespace boost { namespace geometry { namespace index {
namespace detail { namespace rtree { namespace visitors {
template
-struct query
+struct spatial_query
: public rtree::visitor::type
, index::nonassignable
{
@@ -28,7 +28,7 @@ struct query
typedef typename rtree::internal_node::type internal_node;
typedef typename rtree::leaf::type leaf;
- inline query(Translator const& t, Predicates const& p, OutIter out_it)
+ inline spatial_query(Translator const& t, Predicates const& p, OutIter out_it)
: tr(t), pred(p), out_iter(out_it), found_count(0)
{}
@@ -78,4 +78,4 @@ struct query
}}} // namespace boost::geometry::index
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_QUERY_HPP
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP
From 0ccbb1fe0c37eac7f9b8aac331deaae8b0c688d1 Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Thu, 22 Nov 2012 11:28:21 +0000
Subject: [PATCH 03/10] some of warnings fixed.
[SVN r81481]
---
.../extensions/index/rtree/node/node.hpp | 6 +++---
.../extensions/index/rtree/options.hpp | 19 +++++++++++++++----
.../index/rtree/visitors/destroy.hpp | 2 +-
test/rtree/test_rtree.hpp | 2 +-
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/include/boost/geometry/extensions/index/rtree/node/node.hpp b/include/boost/geometry/extensions/index/rtree/node/node.hpp
index 0b87589fb..87f5d9d0a 100644
--- a/include/boost/geometry/extensions/index/rtree/node/node.hpp
+++ b/include/boost/geometry/extensions/index/rtree/node/node.hpp
@@ -109,9 +109,9 @@ struct destroy_elements
}
}
- inline static void apply(typename leaf::elements_type::iterator first,
- typename leaf::elements_type::iterator last,
- Allocators &)
+ inline static void apply(typename leaf::elements_type::iterator /*first*/,
+ typename leaf::elements_type::iterator /*last*/,
+ Allocators & /*allocators*/)
{}
};
diff --git a/include/boost/geometry/extensions/index/rtree/options.hpp b/include/boost/geometry/extensions/index/rtree/options.hpp
index 87d26a02f..0893f65c9 100644
--- a/include/boost/geometry/extensions/index/rtree/options.hpp
+++ b/include/boost/geometry/extensions/index/rtree/options.hpp
@@ -148,19 +148,30 @@ private:
size_t min_elements;
};
+namespace detail {
+
+inline size_t default_rstar_reinserted_elements()
+{
+ return (std::numeric_limits::max)();
+};
+
+} // namespace options::detail
+
class rstar
{
public:
- static const size_t default_reinserted_elements = -1;
-
rstar(size_t max_elements_,
size_t min_elements_,
size_t overlap_cost_threshold_ = 0,
- size_t reinserted_elements_ = default_reinserted_elements)
+ size_t reinserted_elements_ = detail::default_rstar_reinserted_elements())
: max_elements(max_elements_)
, min_elements(min_elements_)
, overlap_cost_threshold(overlap_cost_threshold_)
- , reinserted_elements(default_reinserted_elements == reinserted_elements_ ? (max_elements_ * 3) / 10 : reinserted_elements_)
+ , reinserted_elements(
+ detail::default_rstar_reinserted_elements() == reinserted_elements_ ?
+ (max_elements_ * 3) / 10 :
+ reinserted_elements_
+ )
{}
size_t get_max_elements() const { return max_elements; }
diff --git a/include/boost/geometry/extensions/index/rtree/visitors/destroy.hpp b/include/boost/geometry/extensions/index/rtree/visitors/destroy.hpp
index 567e66d84..0d60fae83 100644
--- a/include/boost/geometry/extensions/index/rtree/visitors/destroy.hpp
+++ b/include/boost/geometry/extensions/index/rtree/visitors/destroy.hpp
@@ -52,7 +52,7 @@ public:
rtree::destroy_node::apply(m_allocators, node_to_destroy);
}
- inline void operator()(leaf & l)
+ inline void operator()(leaf & BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(l))
{
BOOST_GEOMETRY_INDEX_ASSERT(&l == rtree::get(m_current_node), "invalid pointers");
diff --git a/test/rtree/test_rtree.hpp b/test/rtree/test_rtree.hpp
index d7bf83b6f..b33468cf3 100644
--- a/test/rtree/test_rtree.hpp
+++ b/test/rtree/test_rtree.hpp
@@ -327,7 +327,7 @@ template <>
struct test_overlap_impl
{
template
- static void apply(bgi::rtree const& tree, std::vector const& input, Box const& qbox)
+ static void apply(bgi::rtree const& /*tree*/, std::vector const& /*input*/, Box const& /*qbox*/)
{}
};
From e5766cf57e6e1a2a8e06db9cb8a67183ca0f46e6 Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Thu, 22 Nov 2012 14:45:32 +0000
Subject: [PATCH 04/10] Fixed nullptr dereference errors.
[SVN r81483]
---
.../index/rtree/node/dynamic_visitor.hpp | 1 +
.../geometry/extensions/index/rtree/rtree.hpp | 44 +++++++++++++------
test/rtree/test_rtree.hpp | 28 ++++++++++--
3 files changed, 56 insertions(+), 17 deletions(-)
diff --git a/include/boost/geometry/extensions/index/rtree/node/dynamic_visitor.hpp b/include/boost/geometry/extensions/index/rtree/node/dynamic_visitor.hpp
index 7058057e4..1c9962540 100644
--- a/include/boost/geometry/extensions/index/rtree/node/dynamic_visitor.hpp
+++ b/include/boost/geometry/extensions/index/rtree/node/dynamic_visitor.hpp
@@ -84,6 +84,7 @@ inline Derived * get(dynamic_node * n)
template
inline void apply_visitor(Visitor &v, Visitable & n)
{
+ assert(&n);
n.apply_visitor(v);
}
diff --git a/include/boost/geometry/extensions/index/rtree/rtree.hpp b/include/boost/geometry/extensions/index/rtree/rtree.hpp
index 0c75c9b18..b9fa0e9a3 100644
--- a/include/boost/geometry/extensions/index/rtree/rtree.hpp
+++ b/include/boost/geometry/extensions/index/rtree/rtree.hpp
@@ -175,7 +175,7 @@ public:
{
//TODO use Boost.Container allocator_traits_type::select_on_container_copy_construction()
- this->raw_copy(src, *this, m_allocators);
+ this->raw_copy(src, *this, false);
}
/*!
@@ -191,7 +191,7 @@ public:
, m_leafs_level(0)
, m_root(0)
{
- this->raw_copy(src, *this, m_allocators);
+ this->raw_copy(src, *this, false);
}
/*!
@@ -225,7 +225,8 @@ public:
//TODO use Boost.Container allocator_traits_type::propagate_on_container_move_assignment
- this->raw_copy(src, *this, m_allocators);
+ // It uses m_allocators
+ this->raw_copy(src, *this, true);
return *this;
}
@@ -259,7 +260,8 @@ public:
}
else
{
- this->raw_copy(src, *this, m_allocators);
+ // It uses m_allocators
+ this->raw_copy(src, *this, true);
}
return *this;
@@ -346,6 +348,9 @@ public:
template
inline size_type spatial_query(Predicates const& pred, OutIter out_it) const
{
+ if ( !m_root )
+ return 0;
+
detail::rtree::visitors::spatial_query
find_v(m_translator, pred, out_it);
@@ -580,7 +585,8 @@ private:
template
inline void apply_visitor(Visitor & visitor) const
{
- detail::rtree::apply_visitor(visitor, *m_root);
+ if ( m_root )
+ detail::rtree::apply_visitor(visitor, *m_root);
}
/*!
@@ -710,16 +716,27 @@ private:
/*!
Copy the R-tree i.e. whole nodes structure, values and other attributes.
+ It uses destination's allocators to create the new structure.
\note Exception-safety: strong.
\param src The source R-tree.
\param dst The destination R-tree.
*/
- inline void raw_copy(rtree const& src, rtree & dst, allocators_type & allocators) const
+ inline void raw_copy(rtree const& src, rtree & dst, bool copy_all_internals) const
{
- detail::rtree::visitors::copy copy_v(allocators);
- detail::rtree::apply_visitor(copy_v, *src.m_root); // MAY THROW (V: alloc, copy, E: alloc, N: alloc)
+ detail::rtree::visitors::copy copy_v(dst.m_allocators);
+
+ if ( src.m_root )
+ detail::rtree::apply_visitor(copy_v, *src.m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ if ( copy_all_internals )
+ {
+ dst.m_translator = src.m_translator; // MAY THROW
+
+ dst.m_parameters = src.m_parameters;
+ //dst.m_allocators = dst.m_allocators;
+ }
if ( dst.m_root )
{
@@ -728,11 +745,6 @@ private:
dst.m_root = 0;
}
- dst.m_translator = src.m_translator;
-
- dst.m_parameters = src.m_parameters;
- dst.m_allocators = allocators;
-
dst.m_root = copy_v.result;
dst.m_values_count = src.m_values_count;
dst.m_leafs_level = src.m_leafs_level;
@@ -746,6 +758,9 @@ private:
template
inline size_type raw_nearest_one(DistancesPredicates const& dpred, Predicates const& pred, value_type & v) const
{
+ if ( !m_root )
+ return 0;
+
typedef typename detail::point_relation::type point_relation;
typedef typename detail::relation::value_type point_type;
@@ -781,6 +796,9 @@ private:
template
inline size_type raw_nearest_k(DistancesPredicates const& dpred, size_t k, Predicates const& pred, OutIter out_it) const
{
+ if ( !m_root )
+ return 0;
+
typedef typename detail::point_relation::type point_relation;
typedef typename detail::relation::value_type point_type;
diff --git a/test/rtree/test_rtree.hpp b/test/rtree/test_rtree.hpp
index b33468cf3..a5a8e65f8 100644
--- a/test/rtree/test_rtree.hpp
+++ b/test/rtree/test_rtree.hpp
@@ -260,7 +260,8 @@ template
void test_spatial_query(Rtree & rtree, Predicates const& pred, std::vector const& expected_output)
{
BOOST_CHECK( bgi::are_levels_ok(rtree) );
- BOOST_CHECK( bgi::are_boxes_ok(rtree) );
+ if ( !rtree.empty() )
+ BOOST_CHECK( bgi::are_boxes_ok(rtree) );
std::vector output;
size_t n = rtree.spatial_query(pred, std::back_inserter(output));
@@ -481,7 +482,9 @@ void test_nearest_query_k(Rtree const& rtree, std::vector const& input, P
// caluclate biggest distance
std::sort(test_output.begin(), test_output.end(), TestNearestKLess());
- D biggest_d = test_output.back().first;
+ D biggest_d = 0;
+ if ( !test_output.empty() )
+ biggest_d = test_output.back().first;
// transform test output to vector of values
std::vector expected_output(test_output.size());
@@ -534,14 +537,13 @@ void test_copy_assignment_move(bgi::rtree const& tree, Box const& q
{
size_t s = tree.size();
- BOOST_CHECK(s);
-
std::vector expected_output;
tree.spatial_query(qbox, std::back_inserter(expected_output));
// copy constructor
bgi::rtree t1(tree);
+ BOOST_CHECK(tree.empty() == t1.empty());
BOOST_CHECK(tree.size() == t1.size());
std::vector output;
@@ -551,6 +553,7 @@ void test_copy_assignment_move(bgi::rtree const& tree, Box const& q
// copying assignment operator
t1 = tree;
+ BOOST_CHECK(tree.empty() == t1.empty());
BOOST_CHECK(tree.size() == t1.size());
output.clear();
@@ -609,6 +612,8 @@ void test_rtree_by_value(Parameters const& parameters)
typedef bgi::rtree Tree;
typedef typename Tree::box_type B;
+ // not empty tree test
+
Tree tree(parameters);
std::vector input;
B qbox;
@@ -632,6 +637,21 @@ void test_rtree_by_value(Parameters const& parameters)
test_copy_assignment_move(tree, qbox);
test_remove(tree, qbox);
+
+ // empty tree test
+
+ Tree empty_tree(parameters);
+ std::vector empty_input;
+
+ test_intersects_and_disjoint(empty_tree, empty_input, qbox);
+ test_covered_by(empty_tree, empty_input, qbox);
+ test_overlaps(empty_tree, empty_input, qbox);
+ //test_touches(empty_tree, empty_input, qbox);
+ test_within(empty_tree, empty_input, qbox);
+ test_nearest_query(empty_tree, empty_input, pt);
+ test_nearest_query_k(empty_tree, empty_input, pt, 10);
+ test_nearest_query_not_found(empty_tree, generate_outside_point::apply(), 1, 3);
+ test_copy_assignment_move(empty_tree, qbox);
}
// run all tests for one Algorithm for some number of rtrees
From 80be48d155d54d77aa26281174ae3d339f5171fe Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Sat, 24 Nov 2012 19:54:36 +0000
Subject: [PATCH 05/10] Added rtree::swap() method. Added requirement
'Nonthrowing copy constructor of the Translator'.
[SVN r81512]
---
doc/html/geometry_index/introduction.html | 2 +-
doc/html/geometry_index/r_tree.html | 2 +-
.../r_tree/creation_and_modification.html | 6 +-
.../r_tree/exception_safety.html | 56 ++++++++++---------
.../geometry_index/r_tree/introduction.html | 2 +-
.../r_tree/nearest_neighbours_queries.html | 2 +-
.../r_tree/rtree_quickstart.html | 4 +-
.../r_tree/spatial_queries.html | 2 +-
doc/html/index.html | 4 +-
doc/rtree/exception_safety.qbk | 15 ++---
.../geometry/extensions/index/rtree/rtree.hpp | 42 +++++++++-----
test/rtree/test_rtree.hpp | 36 +++++++++---
12 files changed, 107 insertions(+), 66 deletions(-)
diff --git a/doc/html/geometry_index/introduction.html b/doc/html/geometry_index/introduction.html
index aea9c9dc7..dd8b1efc4 100644
--- a/doc/html/geometry_index/introduction.html
+++ b/doc/html/geometry_index/introduction.html
@@ -3,7 +3,7 @@
Introduction
-
+
diff --git a/doc/html/geometry_index/r_tree.html b/doc/html/geometry_index/r_tree.html
index 610c173c3..f204ae1ba 100644
--- a/doc/html/geometry_index/r_tree.html
+++ b/doc/html/geometry_index/r_tree.html
@@ -3,7 +3,7 @@
R-tree
-
+
diff --git a/doc/html/geometry_index/r_tree/creation_and_modification.html b/doc/html/geometry_index/r_tree/creation_and_modification.html
index 50c29f984..09a46b6b3 100644
--- a/doc/html/geometry_index/r_tree/creation_and_modification.html
+++ b/doc/html/geometry_index/r_tree/creation_and_modification.html
@@ -3,7 +3,7 @@
Creation and modification
-
+
@@ -51,7 +51,7 @@
rtree < Value , Parameters , Translator , Allocator >
-
+
Value - type of object which will be stored in the container.
@@ -89,7 +89,7 @@
std :: pair <...> ,
pointer, iterator or smart pointer.
-
+
-Last revised: November 21, 2012 at 16:05:59 GMT
+Last revised: November 24, 2012 at 19:48:27 GMT
diff --git a/doc/rtree/exception_safety.qbk b/doc/rtree/exception_safety.qbk
index f98ec3c15..9ef8e3d7d 100644
--- a/doc/rtree/exception_safety.qbk
+++ b/doc/rtree/exception_safety.qbk
@@ -14,22 +14,22 @@ In order to be exception-safe the __rtree__ requires:
* Nonthrowing destructor of the `__value__`.
* Exception-safe copy constructor of the `__value__`.
-* Exception-safe copy constructor of the `CoordinateType`.
+* Exception-safe copy constructor of the `CoordinateType` used in the `Indexable`.
+* Nonthrowing copy constructor of the `Translator`.
[table
[[Operation] [exception-safety]]
-[[`rtree()`] [ /nothrow (default)/ or *strong*
-[footnote /nothrow/ - if `Translator` has nonthrowing copy constructor (default), *strong* - if `Translator` has throwing copy constructor]]]
+[[`rtree()`] [ /nothrow/ ]]
[[`rtree(first, last)`] [ *strong* ]]
[[`~rtree()`] [ /nothrow/ ]]
[[][]]
[[`rtree(rtree const&)`] [ *strong* ]]
[[`operator=(rtree const&)`] [ *strong* ]]
[[][]]
-[[`rtree(rtree &&)`] [ /nothrow (default)/ or *strong*
-[footnote /nothrow/ - if `Translator` has nonthrowing copy constructor (default), *strong* - if `Translator` has throwing copy constructor]]]
+[[`rtree(rtree &&)`] [ /nothrow/ ]]
[[`operator=(rtree &&)`] [ /nothrow/ or *strong*
-[footnote /nothrow/ - if allocators are equal and `Translator` has nonthrowing copy constructor (default), *strong* - if allocators aren't equal or `Translator` has throwing copy constructor]]]
+[footnote /nothrow/ - if allocators are equal, *strong* - if allocators aren't equal]]]
+[[`swap(rtree &)`] [ /nothrow/ ]]
[[][]]
[[`insert(__value__)`] [ basic ]]
[[`insert(first, last)`] [ basic ]]
@@ -42,7 +42,8 @@ In order to be exception-safe the __rtree__ requires:
[[`size()`] [ /nothrow/ ]]
[[`empty()`] [ /nothrow/ ]]
[[`clear()`] [ /nothrow/ ]]
-[[`box()`] [ /nothrow/ ]]
+[[`box()`] [ /nothrow/ or *strong*
+[footnote /nothrow/ - if `CoordinateType` has nonthrowing copy ctor, *strong* - if `CoordinateType` has throwing copy ctor]]]
[[`get_allocator()`] [ /nothrow/ ]]
[[`parameters()`] [ /nothrow/ ]]
[[`translator()`] [ /nothrow/ ]]
diff --git a/include/boost/geometry/extensions/index/rtree/rtree.hpp b/include/boost/geometry/extensions/index/rtree/rtree.hpp
index b9fa0e9a3..452ee8a1b 100644
--- a/include/boost/geometry/extensions/index/rtree/rtree.hpp
+++ b/include/boost/geometry/extensions/index/rtree/rtree.hpp
@@ -103,15 +103,14 @@ public:
/*!
The constructor.
- \note Exception-safety: nothrow (if translator has nonthrowing copy ctor),
- strong (if translator has throwing copy ctor)
+ \note Exception-safety: nothrow
\param parameters The parameters object.
\param translator The translator object.
\param allocator The allocator object.
*/
inline explicit rtree(Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = Allocator())
- : m_translator(translator) // MAY THROW (copy)
+ : m_translator(translator) // SHOULDN'T THROW
, m_parameters(parameters)
, m_allocators(allocator)
, m_values_count(0)
@@ -132,7 +131,7 @@ public:
*/
template
inline rtree(Iterator first, Iterator last, Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = std::allocator())
- : m_translator(translator) // MAY THROW (copy)
+ : m_translator(translator) // SHOULDN'T THROW
, m_parameters(parameters)
, m_allocators(allocator)
, m_values_count(0)
@@ -166,7 +165,7 @@ public:
\note Exception-safety: strong
*/
inline rtree(rtree const& src)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
, m_parameters(src.m_parameters)
, m_allocators(src.m_allocators)
, m_values_count(0)
@@ -184,7 +183,7 @@ public:
\note Exception-safety: strong
*/
inline rtree(rtree const& src, Allocator const& allocator)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
, m_parameters(src.m_parameters)
, m_allocators(allocator)
, m_values_count(0)
@@ -197,11 +196,10 @@ public:
/*!
The moving constructor.
- \note Exception-safety: nothrow (if translator has nonthrowing copy ctor),
- strong (if translator has throwing copy ctor)
+ \note Exception-safety: nothrow
*/
inline rtree(BOOST_RV_REF(rtree) src)
- : m_translator(src.m_translator) // MAY THROW (copy)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
, m_parameters(src.m_parameters)
, m_allocators(src.m_allocators)
, m_values_count(src.m_values_count)
@@ -234,8 +232,8 @@ public:
/*!
The moving assignment.
- \note Exception-safety: nothrow (if allocators are equal and translator has nonthrowing copy ctor),
- strong (if allocators aren't equal or translator has throwing copy ctor)
+ \note Exception-safety: nothrow (if allocators are equal),
+ strong (if allocators aren't equal)
*/
inline rtree & operator=(BOOST_RV_REF(rtree) src)
{
@@ -246,7 +244,7 @@ public:
if ( m_allocators.allocator == src.m_allocators.allocator )
{
- m_translator = src.m_translator; // MAY THROW (copy)
+ m_translator = src.m_translator; // SHOULDN'T THROW
m_parameters = src.m_parameters;
//m_allocators = src.m_allocators;
@@ -267,6 +265,24 @@ public:
return *this;
}
+ /*!
+ Swaps two rtrees.
+
+ \note Exception-safety: nothrow
+
+ \param other The other rtree.
+ */
+ void swap(rtree & other)
+ {
+ std::swap(m_translator, other.m_translator); // SHOULDN'T THROW
+ std::swap(m_parameters, other.m_parameters);
+ std::swap(m_allocators, other.m_allocators);
+
+ std::swap(m_values_count, other.m_values_count);
+ std::swap(m_leafs_level, other.m_leafs_level);
+ std::swap(m_root, other.m_root);
+ }
+
/*!
Insert a value to the index.
@@ -732,7 +748,7 @@ private:
if ( copy_all_internals )
{
- dst.m_translator = src.m_translator; // MAY THROW
+ dst.m_translator = src.m_translator; // SHOULDN'T THROW
dst.m_parameters = src.m_parameters;
//dst.m_allocators = dst.m_allocators;
diff --git a/test/rtree/test_rtree.hpp b/test/rtree/test_rtree.hpp
index a5a8e65f8..d3ea2e8c4 100644
--- a/test/rtree/test_rtree.hpp
+++ b/test/rtree/test_rtree.hpp
@@ -533,7 +533,7 @@ void test_nearest_query_not_found(Rtree const& rtree, Point const& pt, Coordinat
// rtree copying and moving
template
-void test_copy_assignment_move(bgi::rtree const& tree, Box const& qbox)
+void test_copy_assignment_swap_move(bgi::rtree const& tree, Box const& qbox)
{
size_t s = tree.size();
@@ -560,25 +560,43 @@ void test_copy_assignment_move(bgi::rtree const& tree, Box const& q
t1.spatial_query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t1, output, expected_output);
- // moving constructor
- bgi::rtree t2(boost::move(t1));
+ bgi::rtree t2(tree.parameters());
+ t2.swap(t1);
+ BOOST_CHECK(tree.empty() == t2.empty());
+ BOOST_CHECK(tree.size() == t2.size());
+ BOOST_CHECK(true == t1.empty());
+ BOOST_CHECK(0 == t1.size());
- BOOST_CHECK(t2.size() == s);
- BOOST_CHECK(t1.size() == 0);
+ output.clear();
+ t1.spatial_query(qbox, std::back_inserter(output));
+ BOOST_CHECK(output.empty());
output.clear();
t2.spatial_query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t2, output, expected_output);
+ t2.swap(t1);
+
+ // moving constructor
+ bgi::rtree t3(boost::move(t1));
+
+ BOOST_CHECK(t3.size() == s);
+ BOOST_CHECK(t1.size() == 0);
+
+ output.clear();
+ t3.spatial_query(qbox, std::back_inserter(output));
+ test_exactly_the_same_outputs(t3, output, expected_output);
// moving assignment operator
- t1 = boost::move(t2);
+ t1 = boost::move(t3);
BOOST_CHECK(t1.size() == s);
- BOOST_CHECK(t2.size() == 0);
+ BOOST_CHECK(t3.size() == 0);
output.clear();
t1.spatial_query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t1, output, expected_output);
+
+ //TODO - test SWAP
}
// rtree removing
@@ -634,7 +652,7 @@ void test_rtree_by_value(Parameters const& parameters)
test_nearest_query_k(tree, input, pt, 10);
test_nearest_query_not_found(tree, generate_outside_point::apply(), 1, 3);
- test_copy_assignment_move(tree, qbox);
+ test_copy_assignment_swap_move(tree, qbox);
test_remove(tree, qbox);
@@ -651,7 +669,7 @@ void test_rtree_by_value(Parameters const& parameters)
test_nearest_query(empty_tree, empty_input, pt);
test_nearest_query_k(empty_tree, empty_input, pt, 10);
test_nearest_query_not_found(empty_tree, generate_outside_point
::apply(), 1, 3);
- test_copy_assignment_move(empty_tree, qbox);
+ test_copy_assignment_swap_move(empty_tree, qbox);
}
// run all tests for one Algorithm for some number of rtrees
From 5a6e87b146f491b1436736b53253f99c1ab732b9 Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Sat, 24 Nov 2012 22:17:08 +0000
Subject: [PATCH 06/10] Pointers and Iterators types removed from the default
Translator.
[SVN r81523]
---
.../r_tree/creation_and_modification.html | 25 +-
.../r_tree/exception_safety.html | 7 +-
doc/html/index.html | 2 +-
doc/rtree/creation.qbk | 12 +-
doc/rtree/exception_safety.qbk | 4 +-
.../extensions/index/translator/def.hpp | 216 ++++++++++++------
.../extensions/index/translator/helpers.hpp | 1 +
7 files changed, 166 insertions(+), 101 deletions(-)
diff --git a/doc/html/geometry_index/r_tree/creation_and_modification.html b/doc/html/geometry_index/r_tree/creation_and_modification.html
index 09a46b6b3..003c41cdf 100644
--- a/doc/html/geometry_index/r_tree/creation_and_modification.html
+++ b/doc/html/geometry_index/r_tree/creation_and_modification.html
@@ -83,11 +83,10 @@
Indexables. Each type adapted to Point
or Box
concept is an Indexable. Default Translator
- index :: translator :: def < Value >
- is able to handle Point ,
- Box ,
- std :: pair <...> ,
- pointer, iterator or smart pointer.
+ index :: translator :: def < Value> is able to handle Point ,
+ Box
+ or std :: pair <...>
+ Values.
@@ -95,16 +94,16 @@
| Box
- BasicValue =
- Indexable |
- std :: pair < Indexable, T > | std :: pair < T , Indexable>
-
-
- Value = BasicValue
- | BasicValue * | Iterator < BasicValue >
- | SmartPtr < BasicValue >
+ Value = Indexable
+ | std :: pair < Indexable,
+ T >
+
+ If comparison of two Values is required, the default translator
+ compares both components of the std :: pair <...> . If the second one is a Geometry , geometry :: equals () function is used. For other types it
+ uses operator ==() .
+
Examples of Value types:
diff --git a/doc/html/geometry_index/r_tree/exception_safety.html b/doc/html/geometry_index/r_tree/exception_safety.html
index bbb02dfc4..7307cace6 100644
--- a/doc/html/geometry_index/r_tree/exception_safety.html
+++ b/doc/html/geometry_index/r_tree/exception_safety.html
@@ -351,13 +351,12 @@
diff --git a/doc/html/index.html b/doc/html/index.html
index cd2958d14..37c643eb6 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -56,7 +56,7 @@
-Last revised: November 24, 2012 at 19:48:27 GMT
+Last revised: November 24, 2012 at 22:04:48 GMT
diff --git a/doc/rtree/creation.qbk b/doc/rtree/creation.qbk
index c83f23de8..3025132e5 100644
--- a/doc/rtree/creation.qbk
+++ b/doc/rtree/creation.qbk
@@ -31,13 +31,15 @@ __rtree__ may store `__value__`s of any type as long the `__translator__`
is passed as parameter. It knows how to interpret those `__value__`s
and extract an object understandable by the __rtree__. Those objects are called
`__indexable__`s. Each type adapted to `__point__` or `__box__` concept is an `__indexable__`.
-Default `__translator__` `index::translator::def`
-is able to handle `__point__`, `__box__`, `std::pair<...>`, pointer, iterator
-or smart pointer.
+Default `__translator__` `index::translator::def<__value__>`
+is able to handle `__point__`, `__box__` or `std::pair<...>` `__value__`s.
* `__indexable__ = __point__ | __box__`
-* `BasicValue = Indexable | std::pair<__indexable__, T> | std::pair`
-* `__value__ = BasicValue | BasicValue* | Iterator | SmartPtr`
+* `__value__ = Indexable | std::pair<__indexable__, T>`
+
+If comparison of two `__value__`s is required, the default translator compares
+both components of the `std::pair<...>`. If the second one is a `Geometry`,
+`geometry::equals()` function is used. For other types it uses `operator==()`.
Examples of `__value__` types:
diff --git a/doc/rtree/exception_safety.qbk b/doc/rtree/exception_safety.qbk
index 9ef8e3d7d..3b9847480 100644
--- a/doc/rtree/exception_safety.qbk
+++ b/doc/rtree/exception_safety.qbk
@@ -28,7 +28,7 @@ In order to be exception-safe the __rtree__ requires:
[[][]]
[[`rtree(rtree &&)`] [ /nothrow/ ]]
[[`operator=(rtree &&)`] [ /nothrow/ or *strong*
-[footnote /nothrow/ - if allocators are equal, *strong* - if allocators aren't equal]]]
+[footnote /nothrow/ - if allocators are equal, *strong* - otherwise]]]
[[`swap(rtree &)`] [ /nothrow/ ]]
[[][]]
[[`insert(__value__)`] [ basic ]]
@@ -43,7 +43,7 @@ In order to be exception-safe the __rtree__ requires:
[[`empty()`] [ /nothrow/ ]]
[[`clear()`] [ /nothrow/ ]]
[[`box()`] [ /nothrow/ or *strong*
-[footnote /nothrow/ - if `CoordinateType` has nonthrowing copy ctor, *strong* - if `CoordinateType` has throwing copy ctor]]]
+[footnote /nothrow/ - if `CoordinateType` has nonthrowing copy constructor, *strong* - otherwise]]]
[[`get_allocator()`] [ /nothrow/ ]]
[[`parameters()`] [ /nothrow/ ]]
[[`translator()`] [ /nothrow/ ]]
diff --git a/include/boost/geometry/extensions/index/translator/def.hpp b/include/boost/geometry/extensions/index/translator/def.hpp
index d880e2b13..5020a5b32 100644
--- a/include/boost/geometry/extensions/index/translator/def.hpp
+++ b/include/boost/geometry/extensions/index/translator/def.hpp
@@ -15,100 +15,164 @@
namespace boost { namespace geometry { namespace index { namespace translator {
-namespace dispatch {
-
-// Distinguish between def, def and def
-
-// Geometry
-template
-struct def
-{
- typedef typename detail::extract_indexable::type const& result_type;
-
- result_type operator()(Value const& v) const
- {
- return detail::extract_indexable::get(v);
- }
-
- bool equals(Value const& v1, Value const& v2) const
- {
- return detail::equals::apply(v1, v2);
- }
-};
-
-// Iterator
-template
-struct def
-{
- typedef typename detail::extract_indexable::type const& result_type;
-
- result_type operator()(Value const& v) const
- {
- return detail::extract_indexable::get(*v);
- }
-
- bool equals(Value const& v1, Value const& v2) const
- {
- return v1 == v2;
- }
-};
-
-// SmartPtr
-template
-struct def
-{
- typedef typename detail::extract_indexable::type const& result_type;
-
- result_type operator()(Value const& v) const
- {
- return detail::extract_indexable::get(*v);
- }
-
- bool equals(Value const& v1, Value const& v2) const
- {
- return v1 == v2;
- }
-};
-
-} // namespace dispatch
+//namespace dispatch {
+//
+//// Distinguish between def, def and def
+//
+//// Geometry
+//template
+//struct def
+//{
+// typedef typename detail::extract_indexable::type const& result_type;
+//
+// result_type operator()(Value const& v) const
+// {
+// return detail::extract_indexable::get(v);
+// }
+//
+// bool equals(Value const& v1, Value const& v2) const
+// {
+// return detail::equals::apply(v1, v2);
+// }
+//};
+//
+//// Iterator
+//template
+//struct def
+//{
+// typedef typename detail::extract_indexable::type const& result_type;
+//
+// result_type operator()(Value const& v) const
+// {
+// return detail::extract_indexable::get(*v);
+// }
+//
+// bool equals(Value const& v1, Value const& v2) const
+// {
+// return v1 == v2;
+// }
+//};
+//
+//// SmartPtr
+//template
+//struct def
+//{
+// typedef typename detail::extract_indexable::type const& result_type;
+//
+// result_type operator()(Value const& v) const
+// {
+// return detail::extract_indexable::get(*v);
+// }
+//
+// bool equals(Value const& v1, Value const& v2) const
+// {
+// return v1 == v2;
+// }
+//};
+//
+//} // namespace dispatch
+//
+///*!
+//The default translator. It translates Value object to Indexable object. This is done in
+//operator() which takes const reference to Value and returns const reference to Indexable.
+//
+//\tparam Value The Value type which the translator translates to Indexable.
+//*/
+//template
+//struct def
+// : public dispatch::def
+// <
+// Value,
+// detail::is_iterator::value,
+// detail::is_smart_ptr::value
+// >
+//{
+//};
+//
+///*!
+//The default translator. It translates Value object to Indexable object. Since this is
+//a specialization for pointers to Values operator() takes const ptr to Value and returns
+//const reference to Indexable.
+//
+//\tparam Value The Value type which the translator translates to Indexable.
+//*/
+//template
+//struct def
+//{
+// typedef typename detail::extract_indexable::type const& result_type;
+//
+// result_type operator()(const Value *v) const
+// {
+// return detail::extract_indexable::get(*v);
+// }
+//
+// bool equals(const Value* v1, const Value* v2) const
+// {
+// return v1 == v2;
+// }
+//};
/*!
-The default translator. It translates Value object to Indexable object. This is done in
-operator() which takes const reference to Value and returns const reference to Indexable.
+The default translator. It translates Value object to Indexable object.
-\tparam Value The Value type which the translator translates to Indexable.
+\tparam Value The Value type which may be translated directly to the Indexable.
*/
template
struct def
- : public dispatch::def
- <
- Value,
- detail::is_iterator::value,
- detail::is_smart_ptr::value
- >
{
+ BOOST_MPL_ASSERT_MSG(
+ (!detail::indexable_not_found_error<
+ typename traits::indexable_type::type
+ >::value),
+ NOT_VALID_INDEXABLE_TYPE,
+ (Value)
+ );
+
+ typedef Value const& result_type;
+
+ result_type operator()(Value const& value) const
+ {
+ return value;
+ }
+
+ bool equals(Value const& v1, Value const& v2) const
+ {
+ return geometry::equals(v1, v2);
+ }
};
/*!
-The default translator. It translates Value object to Indexable object. Since this is
-a specialization for pointers to Values operator() takes const ptr to Value and returns
-const reference to Indexable.
+The default translator. This specialization translates from std::pair.
-\tparam Value The Value type which the translator translates to Indexable.
+\tparam Indexable The Indexable type.
+\tparam Second The second type.
*/
-template
-struct def
+template
+struct def< std::pair >
{
- typedef typename detail::extract_indexable::type const& result_type;
+ BOOST_MPL_ASSERT_MSG(
+ (!detail::indexable_not_found_error<
+ typename traits::indexable_type::type
+ >::value),
+ NOT_VALID_INDEXABLE_TYPE,
+ (Indexable)
+ );
- result_type operator()(const Value *v) const
+ typedef Indexable const& result_type;
+
+ result_type operator()(std::pair const& value) const
{
- return detail::extract_indexable::get(*v);
+ return value.first;
}
- bool equals(const Value* v1, const Value* v2) const
+ bool equals(std::pair const& v1, std::pair const& v2) const
{
- return v1 == v2;
+ return geometry::equals(v1.first, v2.first)
+ &&
+ dispatch::equals<
+ Second,
+ typename geometry::traits::tag::type
+ >::apply(v1.second, v2.second);
}
};
diff --git a/include/boost/geometry/extensions/index/translator/helpers.hpp b/include/boost/geometry/extensions/index/translator/helpers.hpp
index 02610f31e..6f0ce2cfb 100644
--- a/include/boost/geometry/extensions/index/translator/helpers.hpp
+++ b/include/boost/geometry/extensions/index/translator/helpers.hpp
@@ -15,6 +15,7 @@
#include
+#include
#include
#include
From f7d7e88bbb2ad15a0a2f1f8adc5abcbe0b9b385c Mon Sep 17 00:00:00 2001
From: Adam Wulkiewicz
Date: Sun, 25 Nov 2012 17:28:12 +0000
Subject: [PATCH 07/10] Modified glut_vis additional test and added generated
rtree images.
[SVN r81528]
---
doc/rtree/images/disjoint.png | Bin 0 -> 2223 bytes
doc/rtree/images/intersects.png | Bin 0 -> 2228 bytes
doc/rtree/images/knn.png | Bin 0 -> 2774 bytes
doc/rtree/images/knn_cover.png | Bin 0 -> 3072 bytes
doc/rtree/images/knn_inters.png | Bin 0 -> 3058 bytes
doc/rtree/images/linear.png | Bin 0 -> 2158 bytes
doc/rtree/images/overlaps.png | Bin 0 -> 2209 bytes
doc/rtree/images/quadratic.png | Bin 0 -> 2096 bytes
doc/rtree/images/rstar.png | Bin 0 -> 2079 bytes
doc/rtree/images/within.png | Bin 0 -> 2208 bytes
.../index/rtree/visitors/gl_draw.hpp | 20 +++---
tests/additional_glut_vis.cpp | 59 +++++++++++++++---
12 files changed, 62 insertions(+), 17 deletions(-)
create mode 100644 doc/rtree/images/disjoint.png
create mode 100644 doc/rtree/images/intersects.png
create mode 100644 doc/rtree/images/knn.png
create mode 100644 doc/rtree/images/knn_cover.png
create mode 100644 doc/rtree/images/knn_inters.png
create mode 100644 doc/rtree/images/linear.png
create mode 100644 doc/rtree/images/overlaps.png
create mode 100644 doc/rtree/images/quadratic.png
create mode 100644 doc/rtree/images/rstar.png
create mode 100644 doc/rtree/images/within.png
diff --git a/doc/rtree/images/disjoint.png b/doc/rtree/images/disjoint.png
new file mode 100644
index 0000000000000000000000000000000000000000..131a915865d2e57778ca9c8c7223640cbd0cb2b3
GIT binary patch
literal 2223
zcmeAS@N?(olHy`uVBq!ia0y~yU^olH9Bd2>4AOhPWHK-?uqAoByDm3UZqra=!JHfq_9bGbEzKIX^cyHLrvL
z1e}Xf6H8K46v{J8G8EiBeFIYTQrQ_8ID|c2978H@y}cVioKdKMYyG52sVAEX3NG+2D3oqX%wSma%vqS>_K&S!TK2u)8pKs{cV+(d
zy0icPeB0fVw%7do$Mg5M{hrg7z>(JVaQTE~xx3ER{=dG;ZBC%T=hY9~9-+QqxKe(izs6Wzzcf#(=
zHb(plBfV1B#mes}&on8>KFqp&XOKbm{L3c3m+xNAc<@hc#xs-kvKC+Fd{;m7>wxk9
zx{n(E26NaPCTD#+^NYdatk<ow$1}RvSeui+Ern9n+X_
zAd{h`Q0hU>v@}EYBS+@2J>__|Wch7BP0PD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-@t>cYl)U}LVYfhb&Dxr67mk={^c#L;^%Y*Io}$(QEuM+;_cc3&+KIqlNwS4V!-u)phm
zXp(+=x9@U+%O*z0RXjJ|m@F+{a%uIS
z$2Q9)V_D5>8JEv|{%v@XMTPnx1xgDOee!@E&3zd>1FL1mr
zkeAxYd2fYBg#nL&Ly?q{X8kdN3Ryp&<~Nqrwi7Qeka##}>%0??+QOsjt>M`qHYc-J
zMyvMv{__9%C@%y+Vj7^x>2jYjM1+@Q?B?x;?l)aq9zvQpV?qiq^SQ)J7=G+*xH%=)1p3CWZm2I
sr@MTw&heLdxBb3mdKI;Vst04B^B_W%F@
literal 0
HcmV?d00001
diff --git a/doc/rtree/images/intersects.png b/doc/rtree/images/intersects.png
new file mode 100644
index 0000000000000000000000000000000000000000..066a1dd80b711b4f58f9e085f7308cb575e83c9f
GIT binary patch
literal 2228
zcmeAS@N?(olHy`uVBq!ia0y~yU^olH9Bd2>4AOhPWHK-?uqAoByDm3bL8Ld-7F?fq_9bGbEzKIX^cyHLrvL
z1e}Xf6H8K46v{J8G8EiBeFIYTQrQ_8I3zq>978H@y}cV-^;kooHF3`J@1_~4a_fE0
zow5;^U2dHBH-S^J<=%UvlgY=8+Ji$K3M*~o`WX~v^7k`T^v4(17wo@pyHx7Mu0{Ff
z-Gx;#F}EeeYhSR}%cjuIMZ7qcS&;Qm
z#y0(-$$^V=pG8)lI2)sBTw1$ey^2h~Sxmt!Th__H%oSTMgbEei*B4*hbNP>A`I*~y
zKds@fxqiQV-c!!D%M2V-!_KeaZ@8>7Dd@NT=U)tb?@T_5?Ju4%r+K!j~=;jiy~*;IZRMkjDC|wzG$qUn`3DV;10bFk!gJ;KDqo
zF;+&F;%Czxi_E?Onn0>95~@c*_&6!
z@?eYJ4wIsXCJf6R^|ob|#CJ(NQrl^;{9yc+q9@9#C->{^I2fa!ZlXKKVB&NAy;mLe
z(;vL>a~4@4YYDRyYc9BgY$(mde7(ozB+B*iNi(D%3RLNezUsdH=+L;%j93G
z3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XZAr6_+w=CjEKQ{@+kxVcGJT^2SqFPEwrtG+%esg)&zE={vbCeVOx$
zEgXWym~8IVU%b1-g7*iP`tHy3I5%HeGAZ*mlb>@QvxTqPLyk9|r?={DnNlVaZ878F
z=L4Bi3f~1c#Cg_ro>aMfzr?C{=9D1Gv<#k7D63$G>59uWg;qHhH#wSgwq7o}oFsUV
z!*Y$lMFp8pM{Zd5%6+YtJ!;P)ZAlb9ACUvP5r%$|Llq@rJFe2DzqMy%sOtrPHJje5x3;`D
zeELgq(L|X|sS+`3J6&D;m|0`f?O$Z=4c#gFQF)fvk
zdHx@tWT3$|=J(0{?AQNapL028?%E)p7dp#d$+YJ0(@T-QG41}`603>#cIvl%&{>>t
zZ*%(7+tSaL|LWn0S+rB|*4pj~x1ZN;QMhU3`^;qBx;Iz+0&L96&;Ds#c=y-7Z|~P{
zzvs-wIPvH%`2Z#VtDHQ`z4qCA{>;9*=;rx?U!?~&WH0l#3bwm7U!rRHse79@N2;e>
z^R^B4dvjUYX0o1)=klBDRjUtVG6?W8C`d85FgIj?n2Q)8%uSEqa2QMuTGgx*HEN9esYO=RsF@xXZPX9^zMeJ%PN@g7{
zUS}oD_x*jt_RBJ%Q#leDE>@g7v?iEg!exkE3KQO4&kVX}&TrxSxykak)PdCHnY9Y3
zmQUq>70g;3T5w4GK&H$My~~UTG8q*7{FoKy&as_j!E2&8!&bA~%A$8s)-^8o&qx^vRt7|YGQmlY;`Q*OKQy5NaPfbGuf!Y4BqNIrZL<$nb1%|(m?N1x6)
z7TUN#D%4=z`>$p%uTQu=UusEwcY&Szee_@Luv^SiQ$ZU0Q}SBGAi{64BQzhc8xFVdQ&MBb@0Ogy;DgXcg
literal 0
HcmV?d00001
diff --git a/doc/rtree/images/knn_inters.png b/doc/rtree/images/knn_inters.png
new file mode 100644
index 0000000000000000000000000000000000000000..c32c6474cb62845f4283f2b890dc817096fcfa67
GIT binary patch
literal 3058
zcmeAS@N?(olHy`uVBq!ia0y~yU^olH9Bd2>4AO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vbYzuI6Vmu9R-#T=psCz)O?<)RpTFFI!=gF6{5TPB_=;wy(tFMOSUk
zXVo1M_R(56@$wWgzy6))9+sI--rZ94lJ8=OC9ep_b(OH2eUqIIeV}mKZEx)W|`+8>H$ZJb`-RAe#e3rx#0wvo>Xg9Ne+*`t2q0&hKuR
zdhB2K%dYR{?z^q~lDLk2uU62jdRy)M)@D{Wvt7LP^@lR&GjsBq5(NA-d)~*fTYTFz
z;W9(Y`OIw+7eth2?VCU6VE(hFZ5yo47H&MDE;r@Y=L)`F8_k|AlJByLW6amQKDE)O
cf%^~Z(X+QUc}c8J1vR}rUHx3vIVCg!0I_t)UjP6A
literal 0
HcmV?d00001
diff --git a/doc/rtree/images/linear.png b/doc/rtree/images/linear.png
new file mode 100644
index 0000000000000000000000000000000000000000..a8cc786a0b99928136ed81c8bf9b987113f97dc2
GIT binary patch
literal 2158
zcmeAS@N?(olHy`uVBq!ia0y~yU^olH9Bd2>4AOhPWHK-?uqAoByDm3bM;=^^LJ-U|^8V42dXl&d<$F%`0I5
z0q3IB#FEq$h4Rdj32(9ho^S(-=In|8L#RWdGnr%CewKPwV#Iw`REb=Lcs)>7U47&4n`Q@$YxvTOV%t
zP|WV%|F2bRfB$aZa5j^pE#Y3_?z^l0@!qrj9q4Dgde{BecbiLAxc$2Qzxj~?&*%U5
zzjrS#T-!A9GJ|E2l*t>5y#{kGD|D47-i%i~Q~JcjVNHSFl_Rom@r(j;60VRN9BdI^uN7f`-8Q1O_5rYt8#afTF+&HGuP+18f>ipd}`XWV86=>
z4{!5!)X8soURw8mZnbLuo32YY&TrfrJ^M04wbj|6scXKLiZ4(8aa+^t>5Ery)Ryn;
zJAE?jwD#{=7w$8je;aA#W@df1RAzsFZ=r|cgWJE&!UIlRRV-@Jcw%xQJ|bg{v&&bW
zn}?U*vU0KDbueML$l$^(zP-==evC&g4Z
zS-+zr+rvV2_o(?p07hs
z`|N|gcE#Ioy(i#1|0&0^Ex$vrR?Rw|;cD=FpZ!w)f+D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