|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80230 - in sandbox-branches/geometry/index: boost/geometry/extensions/index boost/geometry/extensions/index/rtree boost/geometry/extensions/index/rtree/linear boost/geometry/extensions/index/rtree/node boost/geometry/extensions/index/rtree/quadratic boost/geometry/extensions/index/rtree/rstar boost/geometry/extensions/index/rtree/visitors doc doc/html doc/html/geometry_index doc/html/geometry_index/r_tree test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2012-08-25 20:41:16
Author: awulkiew
Date: 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
New Revision: 80230
URL: http://svn.boost.org/trac/boost/changeset/80230
Log:
Implemented r-tree run-time parameters. Tests modified. Added remove() test.
Text files modified:
sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp | 6 ++
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/linear/redistribute_elements.hpp | 62 +++++++++++----------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default.hpp | 7 ++
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default_static.hpp | 7 ++
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/options.hpp | 115 ++++++++++++++++++++++++++++++++++++++++
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/quadratic/redistribute_elements.hpp | 37 ++++++------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/choose_next_node.hpp | 22 ++++--
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/insert.hpp | 75 ++++++++++++++++---------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/redistribute_elements.hpp | 63 +++++++++++----------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp | 35 ++++++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/insert.hpp | 75 +++++++++++++++----------
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest.hpp | 34 ++++++----
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/remove.hpp | 38 +++++++-----
sandbox-branches/geometry/index/doc/html/geometry_index/introduction.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/introduction.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html | 2
sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html | 2
sandbox-branches/geometry/index/doc/html/index.html | 9 +-
sandbox-branches/geometry/index/doc/index.qbk | 4
sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp | 2
sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp | 3
sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp | 3
sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp | 1
sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp | 1
sandbox-branches/geometry/index/test/rtree/test_rtree.hpp | 68 ++++++++++++++++++-----
47 files changed, 484 insertions(+), 216 deletions(-)
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -46,6 +46,12 @@
m_size = s;
}
+ inline void reserve(size_type s)
+ {
+ //BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
+ // do nothing
+ }
+
inline Element & operator[](size_type i)
{
BOOST_GEOMETRY_INDEX_ASSERT(i < m_size, "index of the element outside the container");
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/linear/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/linear/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/linear/redistribute_elements.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -48,25 +48,26 @@
typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
- Translator const& tr,
+ Parameters const& parameters,
+ Translator const& translator,
coordinate_type & separation,
size_t & seed1,
size_t & seed2)
{
- const size_t elements_count = Parameters::max_elements + 1;
+ const size_t elements_count = parameters.get_max_elements() + 1;
BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "unexpected number of elements");
- BOOST_STATIC_ASSERT(2 <= elements_count);
+ BOOST_GEOMETRY_INDEX_ASSERT(2 <= elements_count, "unexpected number of elements");
// find the lowest low, highest high
- coordinate_type lowest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[0], tr));
- coordinate_type highest_high = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[0], tr));
+ coordinate_type lowest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
+ coordinate_type highest_high = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[0], translator));
// and the lowest high
coordinate_type lowest_high = highest_high;
size_t lowest_high_index = 0;
for ( size_t i = 1 ; i < elements_count ; ++i )
{
- coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], tr));
- coordinate_type max_coord = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[i], tr));
+ coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
+ coordinate_type max_coord = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
if ( max_coord < lowest_high )
{
@@ -83,10 +84,10 @@
// find the highest low
size_t highest_low_index = lowest_high_index == 0 ? 1 : 0;
- coordinate_type highest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[highest_low_index], tr));
+ coordinate_type highest_low = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[highest_low_index], translator));
for ( size_t i = highest_low_index ; i < elements_count ; ++i )
{
- coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], tr));
+ coordinate_type min_coord = index::get<min_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
if ( highest_low < min_coord &&
i != lowest_high_index )
{
@@ -126,16 +127,17 @@
typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
+ Parameters const& parameters,
Translator const& tr,
coordinate_type & separation,
size_t & seed1,
size_t & seed2)
{
- pick_seeds_impl<Elements, Parameters, Translator, Dimension - 1>::apply(elements, tr, separation, seed1, seed2);
+ pick_seeds_impl<Elements, Parameters, Translator, Dimension - 1>::apply(elements, parameters, tr, separation, seed1, seed2);
coordinate_type current_separation;
size_t s1, s2;
- find_greatest_normalized_separation<Elements, Parameters, Translator, Dimension - 1>::apply(elements, tr, current_separation, s1, s2);
+ find_greatest_normalized_separation<Elements, Parameters, Translator, Dimension - 1>::apply(elements, parameters, tr, current_separation, s1, s2);
// in the old implementation different operator was used: <= (y axis prefered)
if ( separation < current_separation )
@@ -155,12 +157,13 @@
typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
static inline void apply(Elements const& elements,
+ Parameters const& parameters,
Translator const& tr,
coordinate_type & separation,
size_t & seed1,
size_t & seed2)
{
- find_greatest_normalized_separation<Elements, Parameters, Translator, 0>::apply(elements, tr, separation, seed1, seed2);
+ find_greatest_normalized_separation<Elements, Parameters, Translator, 0>::apply(elements, parameters, tr, separation, seed1, seed2);
}
};
@@ -176,12 +179,13 @@
static const size_t dimension = index::traits::dimension<indexable_type>::value;
static inline void apply(Elements const& elements,
+ Parameters const& parameters,
Translator const& tr,
size_t & seed1,
size_t & seed2)
{
coordinate_type separation = 0;
- pick_seeds_impl<Elements, Parameters, Translator, dimension>::apply(elements, tr, separation, seed1, seed2);
+ pick_seeds_impl<Elements, Parameters, Translator, dimension>::apply(elements, parameters, tr, separation, seed1, seed2);
}
};
@@ -192,18 +196,19 @@
template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
struct redistribute_elements<Value, Options, Translator, Box, Allocators, linear_tag>
{
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+ typedef typename Options::parameters_type parameters_type;
- typedef typename Options::parameters_type parameters_type;
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
template <typename Node>
static inline void apply(Node & n,
Node & second_node,
Box & box1,
Box & box2,
- Translator const& tr)
+ parameters_type const& parameters,
+ Translator const& translator)
{
typedef typename rtree::elements_type<Node>::type elements_type;
typedef typename elements_type::value_type element_type;
@@ -213,20 +218,17 @@
elements_type & elements1 = rtree::elements(n);
elements_type & elements2 = rtree::elements(second_node);
- const size_t elements1_count = parameters_type::max_elements + 1;
+ const size_t elements1_count = parameters.get_max_elements() + 1;
BOOST_GEOMETRY_INDEX_ASSERT(elements1.size() == elements1_count, "unexpected number of elements");
- typedef boost::array<element_type, elements1_count> elements_copy_type;
-
// copy original elements
- elements_copy_type elements_copy;
- std::copy(elements1.begin(), elements1.end(), elements_copy.begin());
+ elements_type elements_copy(elements1);
// calculate initial seeds
size_t seed1 = 0;
size_t seed2 = 0;
- linear::pick_seeds<elements_copy_type, parameters_type, Translator>::apply(elements_copy, tr, seed1, seed2);
+ linear::pick_seeds<elements_type, parameters_type, Translator>::apply(elements_copy, parameters, translator, seed1, seed2);
// prepare nodes' elements containers
elements1.clear();
@@ -237,14 +239,14 @@
elements2.push_back(elements_copy[seed2]);
// calculate boxes
- geometry::convert(rtree::element_indexable(elements_copy[seed1], tr), box1);
- geometry::convert(rtree::element_indexable(elements_copy[seed2], tr), box2);
+ geometry::convert(rtree::element_indexable(elements_copy[seed1], translator), box1);
+ geometry::convert(rtree::element_indexable(elements_copy[seed2], translator), box2);
// initialize areas
content_type content1 = index::content(box1);
content_type content2 = index::content(box2);
- BOOST_STATIC_ASSERT(2 <= elements1_count);
+ BOOST_GEOMETRY_INDEX_ASSERT(2 <= elements1_count, "unexpected elements number");
size_t remaining = elements1_count - 2;
// redistribute the rest of the elements
@@ -253,17 +255,17 @@
if (i != seed1 && i != seed2)
{
element_type const& elem = elements_copy[i];
- indexable_type const& indexable = rtree::element_indexable(elem, tr);
+ indexable_type const& indexable = rtree::element_indexable(elem, translator);
// if there is small number of elements left and the number of elements in node is lesser than min_elems
// just insert them to this node
- if ( elements1.size() + remaining <= parameters_type::min_elements )
+ if ( elements1.size() + remaining <= parameters.get_min_elements() )
{
elements1.push_back(elem);
geometry::expand(box1, indexable);
content1 = index::content(box1);
}
- else if ( elements2.size() + remaining <= parameters_type::min_elements )
+ else if ( elements2.size() + remaining <= parameters.get_min_elements() )
{
elements2.push_back(elem);
geometry::expand(box2, indexable);
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -200,6 +200,13 @@
return n.elements;
}
+// elements derived type
+template <typename Elements, typename NewValue>
+struct container_from_elements_type
+{
+ typedef std::vector<NewValue> type;
+};
+
// allocators
template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default_static.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default_static.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/node/node_default_static.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -53,6 +53,13 @@
elements_type elements;
};
+// elements derived type
+template <typename OldValue, size_t N, typename NewValue>
+struct container_from_elements_type<index::pushable_array<OldValue, N>, NewValue>
+{
+ typedef index::pushable_array<NewValue, N> type;
+};
+
// allocators_poly
template <typename Allocator, typename Value, typename Parameters, typename Box>
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/options.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/options.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/options.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_OPTIONS_HPP
#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_OPTIONS_HPP
+#include <limits>
+
namespace boost { namespace geometry { namespace index {
// InsertTag
@@ -53,6 +55,9 @@
{
static const size_t max_elements = MaxElements;
static const size_t min_elements = MinElements;
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
};
/*!
@@ -66,6 +71,9 @@
{
static const size_t max_elements = MaxElements;
static const size_t min_elements = MinElements;
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
};
namespace options { namespace detail {
@@ -99,8 +107,76 @@
static const size_t min_elements = MinElements;
static const size_t overlap_cost_threshold = OverlapCostThreshold;
static const size_t reinserted_elements = ReinsertedElements;
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
+ size_t get_overlap_cost_threshold() const { return overlap_cost_threshold; }
+ size_t get_reinserted_elements() const { return reinserted_elements; }
+};
+
+namespace runtime {
+
+class linear
+{
+public:
+ linear(size_t max_elements_, size_t min_elements_)
+ : max_elements(max_elements_)
+ , min_elements(min_elements_)
+ {}
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
+
+private:
+ size_t max_elements;
+ size_t min_elements;
+};
+
+class quadratic
+{
+public:
+ quadratic(size_t max_elements_, size_t min_elements_)
+ : max_elements(max_elements_)
+ , min_elements(min_elements_)
+ {}
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
+
+private:
+ size_t max_elements;
+ size_t min_elements;
};
+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)
+ : 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_)
+ {}
+
+ size_t get_max_elements() const { return max_elements; }
+ size_t get_min_elements() const { return min_elements; }
+ size_t get_overlap_cost_threshold() const { return overlap_cost_threshold; }
+ size_t get_reinserted_elements() const { return reinserted_elements; }
+
+private:
+ size_t max_elements;
+ size_t min_elements;
+ size_t overlap_cost_threshold;
+ size_t reinserted_elements;
+};
+
+}
+
namespace options {
template <typename Parameters, typename InsertTag, typename ChooseNextNodeTag, typename SplitTag, typename RedistributeTag, typename NodeTag>
@@ -183,6 +259,45 @@
// > type;
//};
+template <>
+struct options_type< runtime::linear >
+{
+ typedef options::rtree<
+ runtime::linear,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ linear_tag,
+ node_default_tag
+ > type;
+};
+
+template <>
+struct options_type< runtime::quadratic >
+{
+ typedef options::rtree<
+ runtime::quadratic,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ quadratic_tag,
+ node_default_tag
+ > type;
+};
+
+template <>
+struct options_type< runtime::rstar >
+{
+ typedef options::rtree<
+ runtime::rstar,
+ insert_reinsert_tag,
+ choose_by_overlap_diff_tag,
+ split_default_tag,
+ rstar_tag,
+ node_default_tag
+ > type;
+};
+
}} // namespace detail::rtree
}}} // namespace boost::geometry::index
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/quadratic/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/quadratic/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/quadratic/redistribute_elements.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -38,13 +38,14 @@
typedef typename index::default_content_result<box_type>::type content_type;
static inline void apply(Elements const& elements,
+ Parameters const& parameters,
Translator const& tr,
size_t & seed1,
size_t & seed2)
{
- const size_t elements_count = Parameters::max_elements + 1;
+ const size_t elements_count = parameters.get_max_elements() + 1;
BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "wrong number of elements");
- BOOST_STATIC_ASSERT(2 <= elements_count);
+ BOOST_GEOMETRY_INDEX_ASSERT(2 <= elements_count, "unexpected number of elements");
content_type greatest_free_content = 0;
seed1 = 0;
@@ -92,7 +93,8 @@
Node & second_node,
Box & box1,
Box & box2,
- Translator const& tr)
+ parameters_type const& parameters,
+ Translator const& translator)
{
typedef typename rtree::elements_type<Node>::type elements_type;
typedef typename elements_type::value_type element_type;
@@ -101,20 +103,17 @@
elements_type & elements1 = rtree::elements(n);
elements_type & elements2 = rtree::elements(second_node);
- const size_t elements1_count = parameters_type::max_elements + 1;
-
- typedef index::pushable_array<element_type, elements1_count> elements_copy_type;
+ const size_t elements1_count = parameters.get_max_elements() + 1;
BOOST_GEOMETRY_INDEX_ASSERT(elements1.size() == elements1_count, "unexpected elements number");
// copy original elements
- elements_copy_type elements_copy(elements1_count);
- std::copy(elements1.begin(), elements1.end(), elements_copy.begin());
+ elements_type elements_copy(elements1);
// calculate initial seeds
size_t seed1 = 0;
size_t seed2 = 0;
- quadratic::pick_seeds<elements_copy_type, parameters_type, Translator, Box>::apply(elements_copy, tr, seed1, seed2);
+ quadratic::pick_seeds<elements_type, parameters_type, Translator, Box>::apply(elements_copy, parameters, translator, seed1, seed2);
// prepare nodes' elements containers
elements1.clear();
@@ -125,8 +124,8 @@
elements2.push_back(elements_copy[seed2]);
// calculate boxes
- geometry::convert(rtree::element_indexable(elements_copy[seed1], tr), box1);
- geometry::convert(rtree::element_indexable(elements_copy[seed2], tr), box2);
+ geometry::convert(rtree::element_indexable(elements_copy[seed1], translator), box1);
+ geometry::convert(rtree::element_indexable(elements_copy[seed2], translator), box2);
// remove seeds
if (seed1 < seed2)
@@ -149,7 +148,7 @@
// redistribute the rest of the elements
while ( !elements_copy.empty() )
{
- typename elements_copy_type::reverse_iterator el_it = elements_copy.rbegin();
+ typename elements_type::reverse_iterator el_it = elements_copy.rbegin();
bool insert_into_group1 = false;
size_t elements1_count = elements1.size();
@@ -157,11 +156,11 @@
// if there is small number of elements left and the number of elements in node is lesser than min_elems
// just insert them to this node
- if ( elements1_count + remaining <= parameters_type::min_elements )
+ if ( elements1_count + remaining <= parameters.get_min_elements() )
{
insert_into_group1 = true;
}
- else if ( elements2_count + remaining <= parameters_type::min_elements )
+ else if ( elements2_count + remaining <= parameters.get_min_elements() )
{
insert_into_group1 = false;
}
@@ -172,7 +171,7 @@
content_type content_increase1 = 0;
content_type content_increase2 = 0;
el_it = pick_next(elements_copy.rbegin(), elements_copy.rend(),
- box1, box2, content1, content2, tr,
+ box1, box2, content1, content2, translator,
content_increase1, content_increase2);
if ( content_increase1 < content_increase2 ||
@@ -189,7 +188,7 @@
// move element to the choosen group
element_type const& elem = *el_it;
- indexable_type const& indexable = rtree::element_indexable(elem, tr);
+ indexable_type const& indexable = rtree::element_indexable(elem, translator);
if ( insert_into_group1 )
{
@@ -205,7 +204,7 @@
}
BOOST_GEOMETRY_INDEX_ASSERT(!elements_copy.empty(), "expected more elements");
- typename elements_copy_type::iterator el_it_base = el_it.base();
+ typename elements_type::iterator el_it_base = el_it.base();
elements_copy.erase(--el_it_base);
BOOST_GEOMETRY_INDEX_ASSERT(0 < remaining, "expected more remaining elements");
@@ -219,7 +218,7 @@
static inline It pick_next(It first, It last,
Box const& box1, Box const& box2,
content_type const& content1, content_type const& content2,
- Translator const& tr,
+ Translator const& translator,
content_type & out_content_increase1, content_type & out_content_increase2)
{
typedef typename boost::iterator_value<It>::type element_type;
@@ -233,7 +232,7 @@
// find element with greatest difference between increased group's boxes areas
for ( It el_it = first ; el_it != last ; ++el_it )
{
- indexable_type const& indexable = rtree::element_indexable(*el_it, tr);
+ indexable_type const& indexable = rtree::element_indexable(*el_it, translator);
// calculate enlarged boxes and areas
Box enlarged_box1(box1);
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/choose_next_node.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/choose_next_node.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/choose_next_node.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -44,16 +44,19 @@
public:
template <typename Indexable>
- static inline size_t apply(internal_node & n, Indexable const& indexable, size_t node_relative_level)
+ static inline size_t apply(internal_node & n,
+ Indexable const& indexable,
+ parameters_type const& parameters,
+ size_t node_relative_level)
{
children_type & children = rtree::elements(n);
// children are leafs
if ( node_relative_level <= 1 )
{
- if ( 0 < parameters_type::overlap_cost_threshold &&
- parameters_type::overlap_cost_threshold < children.size() )
- return choose_by_nearly_minimum_overlap_cost(children, indexable);
+ if ( 0 < parameters.get_overlap_cost_threshold() &&
+ parameters.get_overlap_cost_threshold() < children.size() )
+ return choose_by_nearly_minimum_overlap_cost(children, indexable, parameters.get_overlap_cost_threshold());
else
return choose_by_minimum_overlap_cost(children, indexable);
}
@@ -64,7 +67,8 @@
private:
template <typename Indexable>
- static inline size_t choose_by_minimum_overlap_cost(children_type const& children, Indexable const& indexable)
+ static inline size_t choose_by_minimum_overlap_cost(children_type const& children,
+ Indexable const& indexable)
{
size_t children_count = children.size();
@@ -120,7 +124,9 @@
}
template <typename Indexable>
- static inline size_t choose_by_nearly_minimum_overlap_cost(children_type const& children, Indexable const& indexable)
+ static inline size_t choose_by_nearly_minimum_overlap_cost(children_type const& children,
+ Indexable const& indexable,
+ size_t overlap_cost_threshold)
{
const size_t children_count = children.size();
@@ -144,14 +150,14 @@
// sort by content_diff
std::sort(sorted_children.begin(), sorted_children.end(), content_diff_less);
- BOOST_GEOMETRY_INDEX_ASSERT(parameters_type::overlap_cost_threshold <= children_count, "there are not enough children");
+ BOOST_GEOMETRY_INDEX_ASSERT(overlap_cost_threshold <= children_count, "there are not enough children");
// for overlap_cost_threshold child nodes find the one with smallest overlap value
size_t choosen_index = 0;
content_type smallest_overlap_diff = std::numeric_limits<content_type>::max();
// for each node
- for (size_t i = 0 ; i < parameters_type::overlap_cost_threshold ; ++i )
+ for (size_t i = 0 ; i < overlap_cost_threshold ; ++i )
{
size_t child_index = boost::get<0>(sorted_children[i]);
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/insert.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/insert.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/insert.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -36,7 +36,8 @@
Node & n,
internal_node *parent,
size_t current_child_index,
- Translator const& tr)
+ parameters_type const& parameters,
+ Translator const& translator)
{
typedef typename rtree::elements_type<Node>::type elements_type;
typedef typename elements_type::value_type element_type;
@@ -46,8 +47,8 @@
elements_type & elements = rtree::elements(n);
- const size_t elements_count = parameters_type::max_elements + 1;
- const size_t reinserted_elements_count = parameters_type::reinserted_elements;
+ const size_t elements_count = parameters.get_max_elements() + 1;
+ const size_t reinserted_elements_count = parameters.get_reinserted_elements();
BOOST_GEOMETRY_INDEX_ASSERT(parent, "node shouldn't be the root node");
BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "unexpected elements number");
@@ -58,11 +59,15 @@
geometry::centroid(rtree::elements(*parent)[current_child_index].first, node_center);
// fill the container of centers' distances of children from current node's center
- boost::array<std::pair<distance_type, element_type>, elements_count> sorted_elements;
+ typename index::detail::rtree::container_from_elements_type<
+ elements_type,
+ std::pair<distance_type, element_type>
+ >::type sorted_elements(elements_count);
+
for ( size_t i = 0 ; i < elements_count ; ++i )
{
point_type element_center;
- geometry::centroid( rtree::element_indexable(elements[i], tr),
+ geometry::centroid( rtree::element_indexable(elements[i], translator),
element_center);
sorted_elements[i].first = geometry::comparable_distance(node_center, element_center);
sorted_elements[i].second = elements[i];
@@ -135,10 +140,11 @@
inline level_insert_base(node* & root,
size_t & leafs_level,
Element const& element,
- Translator const& tr,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level)
- : base(root, leafs_level, element, tr, allocators, relative_level)
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
, result_relative_level(0)
{}
@@ -150,7 +156,7 @@
result_relative_level = base::m_leafs_level - base::m_current_level;
// overflow
- if ( parameters_type::max_elements < rtree::elements(n).size() )
+ if ( base::m_parameters.get_max_elements() < rtree::elements(n).size() )
{
// node isn't root node
if ( base::m_parent )
@@ -158,7 +164,7 @@
rstar::remove_elements_to_reinsert<Value, Options, Translator, Box, Allocators>::apply(
result_elements, n,
base::m_parent, base::m_current_child_index,
- base::m_tr);
+ base::m_parameters, base::m_translator);
}
// node is root node
else
@@ -173,7 +179,7 @@
inline void handle_possible_split(Node &n) const
{
// overflow
- if ( parameters_type::max_elements < rtree::elements(n).size() )
+ if ( base::m_parameters.get_max_elements() < rtree::elements(n).size() )
{
base::split(n);
}
@@ -186,7 +192,7 @@
{
// calulate node's new box
rtree::elements(*base::m_parent)[base::m_current_child_index].first =
- elements_box<Box>(rtree::elements(n).begin(), rtree::elements(n).end(), base::m_tr);
+ elements_box<Box>(rtree::elements(n).begin(), rtree::elements(n).end(), base::m_translator);
}
}
@@ -203,13 +209,16 @@
typedef typename base::internal_node internal_node;
typedef typename base::leaf leaf;
+ typedef typename Options::parameters_type parameters_type;
+
inline level_insert(node* & root,
size_t & leafs_level,
Element const& element,
- Translator const& tr,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level)
- : base(root, leafs_level, element, tr, allocators, relative_level)
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
{}
inline void operator()(internal_node & n)
@@ -269,13 +278,16 @@
typedef typename base::internal_node internal_node;
typedef typename base::leaf leaf;
+ typedef typename Options::parameters_type parameters_type;
+
inline level_insert(node* & root,
size_t & leafs_level,
Value const& v,
- Translator const& t,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level)
- : base(root, leafs_level, v, t, allocators, relative_level)
+ : base(root, leafs_level, v, parameters, translator, allocators, relative_level)
{}
inline void operator()(internal_node & n)
@@ -316,13 +328,16 @@
typedef typename base::internal_node internal_node;
typedef typename base::leaf leaf;
+ typedef typename Options::parameters_type parameters_type;
+
inline level_insert(node* & root,
size_t & leafs_level,
Value const& v,
- Translator const& t,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level)
- : base(root, leafs_level, v, t, allocators, relative_level)
+ : base(root, leafs_level, v, parameters, translator, allocators, relative_level)
{}
inline void operator()(internal_node & n)
@@ -359,20 +374,23 @@
: public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
, index::nonassignable
{
-private:
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+ typedef typename Options::parameters_type parameters_type;
+
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
public:
inline insert(node* & root,
size_t & leafs_level,
Element const& element,
- Translator const& tr,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level = 0)
: m_root(root), m_leafs_level(leafs_level), m_element(element)
- , m_tr(tr), m_relative_level(relative_level), m_allocators(allocators)
+ , m_parameters(parameters), m_translator(translator)
+ , m_relative_level(relative_level), m_allocators(allocators)
{}
inline void operator()(internal_node & BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(n))
@@ -380,7 +398,7 @@
BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<internal_node>(m_root), "current node should be the root");
detail::rstar::level_insert<0, Element, Value, Options, Translator, Box, Allocators> lins_v(
- m_root, m_leafs_level, m_element, m_tr, m_allocators, m_relative_level);
+ m_root, m_leafs_level, m_element, m_parameters, m_translator, m_allocators, m_relative_level);
rtree::apply_visitor(lins_v, *m_root);
@@ -395,7 +413,7 @@
BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<leaf>(m_root), "current node should be the root");
detail::rstar::level_insert<0, Element, Value, Options, Translator, Box, Allocators> lins_v(
- m_root, m_leafs_level, m_element, m_tr, m_allocators, m_relative_level);
+ m_root, m_leafs_level, m_element, m_parameters, m_translator, m_allocators, m_relative_level);
rtree::apply_visitor(lins_v, *m_root);
@@ -414,7 +432,7 @@
it != elements.rend(); ++it)
{
detail::rstar::level_insert<1, element_type, Value, Options, Translator, Box, Allocators> lins_v(
- m_root, m_leafs_level, *it, m_tr, m_allocators, relative_level);
+ m_root, m_leafs_level, *it, m_parameters, m_translator, m_allocators, relative_level);
rtree::apply_visitor(lins_v, *m_root);
@@ -431,7 +449,10 @@
node* & m_root;
size_t & m_leafs_level;
Element const& m_element;
- Translator const& m_tr;
+
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
+
size_t m_relative_level;
Allocators m_allocators;
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/redistribute_elements.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/redistribute_elements.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rstar/redistribute_elements.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -60,35 +60,35 @@
margin_type & sum_of_margins,
content_type & smallest_overlap,
content_type & smallest_content,
- Translator const& tr)
+ Parameters const& parameters,
+ Translator const& translator)
{
typedef typename Elements::value_type element_type;
- BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == Parameters::max_elements + 1, "wrong number of elements");
+ BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == parameters.get_max_elements() + 1, "wrong number of elements");
// copy elements
- boost::array<element_type, Parameters::max_elements + 1> elements_copy;
- std::copy(elements.begin(), elements.end(), elements_copy.begin());
+ Elements elements_copy = elements;
// sort elements
- element_axis_corner_less<element_type, Translator, Corner, AxisIndex> elements_less(tr);
+ element_axis_corner_less<element_type, Translator, Corner, AxisIndex> elements_less(translator);
std::sort(elements_copy.begin(), elements_copy.end(), elements_less);
// init outputs
- choosen_index = Parameters::min_elements;
+ choosen_index = parameters.get_min_elements();
sum_of_margins = 0;
smallest_overlap = std::numeric_limits<content_type>::max();
smallest_content = std::numeric_limits<content_type>::max();
// calculate sum of margins for all distributions
- size_t index_last = Parameters::max_elements - Parameters::min_elements + 2;
- for ( size_t i = Parameters::min_elements ; i < index_last ; ++i )
+ size_t index_last = parameters.get_max_elements() - parameters.get_min_elements() + 2;
+ for ( size_t i = parameters.get_min_elements() ; i < index_last ; ++i )
{
// TODO - awulkiew: may be optimized - box of group 1 may be initialized with
// box of min_elems number of elements and expanded for each iteration by another element
- Box box1 = rtree::elements_box<Box>(elements_copy.begin(), elements_copy.begin() + i, tr);
- Box box2 = rtree::elements_box<Box>(elements_copy.begin() + i, elements_copy.end(), tr);
+ Box box1 = rtree::elements_box<Box>(elements_copy.begin(), elements_copy.begin() + i, translator);
+ Box box2 = rtree::elements_box<Box>(elements_copy.begin() + i, elements_copy.end(), translator);
sum_of_margins += index::margin(box1) + index::margin(box2);
@@ -124,7 +124,8 @@
margin_type & sum_of_margins,
content_type & smallest_overlap,
content_type & smallest_content,
- Translator const& tr)
+ Parameters const& parameters,
+ Translator const& translator)
{
size_t index1 = 0;
margin_type som1 = 0;
@@ -134,7 +135,7 @@
choose_split_axis_and_index_for_corner<Parameters, Box, min_corner, AxisIndex>::
apply(elements, index1,
som1, ovl1, con1,
- tr);
+ parameters, translator);
size_t index2 = 0;
margin_type som2 = 0;
@@ -144,7 +145,7 @@
choose_split_axis_and_index_for_corner<Parameters, Box, max_corner, AxisIndex>::
apply(elements, index2,
som2, ovl2, con2,
- tr);
+ parameters, translator);
sum_of_margins = som1 + som2;
@@ -178,12 +179,13 @@
margin_type & sum_of_margins,
content_type & smallest_overlap,
content_type & smallest_content,
- Translator const& tr)
+ Parameters const& parameters,
+ Translator const& translator)
{
choose_split_axis_and_index_for_corner<Parameters, Box, min_corner, AxisIndex>::
apply(elements, choosen_index,
sum_of_margins, smallest_overlap, smallest_content,
- tr);
+ parameters, translator);
choosen_corner = min_corner;
}
@@ -205,14 +207,15 @@
margin_type & smallest_sum_of_margins,
content_type & smallest_overlap,
content_type & smallest_content,
- Translator const& tr)
+ Parameters const& parameters,
+ Translator const& translator)
{
typedef typename rtree::element_indexable_type<typename Elements::value_type, Translator>::type element_indexable_type;
choose_split_axis_and_index<Parameters, Box, Dimension - 1>::
apply(elements, choosen_axis, choosen_corner, choosen_index,
smallest_sum_of_margins, smallest_overlap, smallest_content,
- tr);
+ parameters, translator);
margin_type sum_of_margins = 0;
@@ -227,7 +230,7 @@
Box,
Dimension - 1,
typename index::traits::tag<element_indexable_type>::type
- >::apply(elements, corner, index, sum_of_margins, overlap_val, content_val, tr);
+ >::apply(elements, corner, index, sum_of_margins, overlap_val, content_val, parameters, translator);
if ( sum_of_margins < smallest_sum_of_margins )
{
@@ -255,7 +258,8 @@
margin_type & smallest_sum_of_margins,
content_type & smallest_overlap,
content_type & smallest_content,
- Translator const& tr)
+ Parameters const& parameters,
+ Translator const& translator)
{
typedef typename rtree::element_indexable_type<typename Elements::value_type, Translator>::type element_indexable_type;
@@ -266,7 +270,7 @@
Box,
0,
typename index::traits::tag<element_indexable_type>::type
- >::apply(elements, choosen_corner, choosen_index, smallest_sum_of_margins, smallest_overlap, smallest_content, tr);
+ >::apply(elements, choosen_corner, choosen_index, smallest_sum_of_margins, smallest_overlap, smallest_content, parameters, translator);
}
};
@@ -329,7 +333,8 @@
Node & second_node,
Box & box1,
Box & box2,
- Translator const& tr)
+ parameters_type const& parameters,
+ Translator const& translator)
{
typedef typename rtree::elements_type<Node>::type elements_type;
@@ -338,7 +343,7 @@
size_t split_axis = 0;
size_t split_corner = 0;
- size_t split_index = parameters_type::min_elements;
+ size_t split_index = parameters.get_min_elements();
margin_type smallest_sum_of_margins = std::numeric_limits<margin_type>::max();
content_type smallest_overlap = std::numeric_limits<content_type>::max();
content_type smallest_content = std::numeric_limits<content_type>::max();
@@ -347,28 +352,28 @@
apply(elements1,
split_axis, split_corner, split_index,
smallest_sum_of_margins, smallest_overlap, smallest_content,
- tr);
+ parameters, translator);
// TODO: awulkiew - get rid of following static_casts?
BOOST_GEOMETRY_INDEX_ASSERT(split_axis < index::traits::dimension<Box>::value, "unexpected value");
BOOST_GEOMETRY_INDEX_ASSERT(split_corner == static_cast<size_t>(min_corner) || split_corner == static_cast<size_t>(max_corner), "unexpected value");
- BOOST_GEOMETRY_INDEX_ASSERT(parameters_type::min_elements <= split_index && split_index <= parameters_type::max_elements - parameters_type::min_elements + 1, "unexpected value");
+ BOOST_GEOMETRY_INDEX_ASSERT(parameters.get_min_elements() <= split_index && split_index <= parameters.get_max_elements() - parameters.get_min_elements() + 1, "unexpected value");
// TODO: awulkiew - check if std::partial_sort produces the same result as std::sort
if ( split_corner == static_cast<size_t>(min_corner) )
- rstar::partial_sort<min_corner, dimension>::apply(elements1, split_axis, split_index, tr);
+ rstar::partial_sort<min_corner, dimension>::apply(elements1, split_axis, split_index, translator);
else
- rstar::partial_sort<max_corner, dimension>::apply(elements1, split_axis, split_index, tr);
+ rstar::partial_sort<max_corner, dimension>::apply(elements1, split_axis, split_index, translator);
// copy elements to node 2 and remove from node 1
- elements2.resize(parameters_type::max_elements + 1 - split_index);
+ elements2.resize(parameters.get_max_elements() + 1 - split_index);
std::copy(elements1.begin() + split_index, elements1.end(), elements2.begin());
elements1.resize(split_index);
// calculate boxes
- box1 = rtree::elements_box<Box>(elements1.begin(), elements1.end(), tr);
- box2 = rtree::elements_box<Box>(elements2.begin(), elements2.end(), tr);
+ box1 = rtree::elements_box<Box>(elements1.begin(), elements1.end(), translator);
+ box2 = rtree::elements_box<Box>(elements2.begin(), elements2.end(), translator);
}
};
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -96,13 +96,15 @@
/*!
The constructor.
+ \param parameters The parameters object.
\param translator The translator object.
\param allocator The allocator object.
*/
- inline explicit rtree(translator_type const& translator = translator_type(), Allocator allocator = Allocator())
+ inline explicit rtree(Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = Allocator())
: m_values_count(0)
, m_root(0)
, m_leafs_level(0)
+ , m_parameters(parameters)
, m_translator(translator)
, m_allocators(allocator)
{
@@ -114,14 +116,16 @@
\param first The beginning of the range of Values.
\param last The end of the range of Values.
+ \param parameters The parameters object.
\param translator The translator object.
\param allocator The allocator object.
*/
template<typename Iterator>
- inline rtree(Iterator first, Iterator last, translator_type const& translator = translator_type(), Allocator allocator = std::allocator<value_type>())
+ inline rtree(Iterator first, Iterator last, Parameters parameters = Parameters(), translator_type const& translator = translator_type(), Allocator allocator = std::allocator<value_type>())
: m_values_count(0)
, m_root(0)
, m_leafs_level(0)
+ , m_parameters(parameters)
, m_translator(translator)
, m_allocators(allocator)
{
@@ -142,7 +146,9 @@
The copy constructor.
*/
inline rtree(rtree const& src)
- : m_allocators(src.m_allocators)
+ : m_parameters(src.m_parameters)
+ , m_translator(src.m_translator)
+ , m_allocators(src.m_allocators)
{
//TODO use Boost.Container allocator_traits_type::select_on_container_copy_construction()
@@ -161,7 +167,9 @@
The copy constructor.
*/
inline rtree(rtree const& src, Allocator const& allocator)
- : m_allocators(allocator)
+ : m_parameters(src.m_parameters)
+ , m_translator(src.m_translator)
+ , m_allocators(allocator)
{
try
{
@@ -181,6 +189,7 @@
: m_values_count(src.m_values_count)
, m_root(src.m_root)
, m_leafs_level(src.m_leafs_level)
+ , m_parameters(src.m_parameters)
, m_translator(src.m_translator)
, m_allocators(src.m_allocators)
{
@@ -202,6 +211,8 @@
if ( !this->empty() )
this->destroy(*this);
+ m_parameters = src.m_parameters;
+ m_translator = src.m_translator;
//m_allocators = src.m_allocators;
try
@@ -230,6 +241,8 @@
if ( !this->empty() )
this->destroy(*this);
+ m_parameters = src.m_parameters;
+ m_translator = src.m_translator;
//m_allocators = src.m_allocators;
if ( m_allocators.allocator == src.m_allocators.allocator)
@@ -240,7 +253,6 @@
src.m_root = 0;
m_leafs_level = src.m_leafs_level;
src.m_leafs_level = 0;
- m_translator = src.m_translator;
}
else
{
@@ -277,7 +289,7 @@
box_type,
allocators_type,
typename options_type::insert_tag
- > insert_v(m_root, m_leafs_level, value, m_translator, m_allocators);
+ > insert_v(m_root, m_leafs_level, value, m_parameters, m_translator, m_allocators);
detail::rtree::apply_visitor(insert_v, *m_root);
@@ -322,7 +334,7 @@
translator_type,
box_type,
allocators_type
- > remove_v(m_root, m_leafs_level, value, m_translator, m_allocators);
+ > remove_v(m_root, m_leafs_level, value, m_parameters, m_translator, m_allocators);
detail::rtree::apply_visitor(remove_v, *m_root);
@@ -617,15 +629,12 @@
*/
inline void copy(rtree const& src, rtree & dst) const
{
- //dst.m_allocators = src.m_allocators;
-
detail::rtree::visitors::copy<value_type, options_type, translator_type, box_type, allocators_type> copy_v(dst.m_allocators);
detail::rtree::apply_visitor(copy_v, *src.m_root);
dst.m_root = copy_v.result;
dst.m_values_count = src.m_values_count;
dst.m_leafs_level = src.m_leafs_level;
- dst.m_translator = src.m_translator;
}
/*!
@@ -654,7 +663,7 @@
DistancesPredicates,
Predicates,
result_type
- > nearest_v(m_translator, dpred, pred, result);
+ > nearest_v(m_parameters, m_translator, dpred, pred, result);
detail::rtree::apply_visitor(nearest_v, *m_root);
@@ -687,7 +696,7 @@
DistancesPredicates,
Predicates,
result_type
- > nearest_v(m_translator, dpred, pred, result);
+ > nearest_v(m_parameters, m_translator, dpred, pred, result);
detail::rtree::apply_visitor(nearest_v, *m_root);
@@ -697,6 +706,8 @@
size_type m_values_count;
node *m_root;
size_type m_leafs_level;
+
+ Parameters m_parameters;
translator_type m_translator;
allocators_type m_allocators;
};
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/insert.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/insert.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/insert.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -28,16 +28,21 @@
template <typename Value, typename Options, typename Box, typename Allocators>
struct choose_next_node<Value, Options, Box, Allocators, choose_by_content_diff_tag>
{
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+ typedef typename Options::parameters_type parameters_type;
+
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
typedef typename rtree::elements_type<internal_node>::type children_type;
typedef typename index::default_content_result<Box>::type content_type;
template <typename Indexable>
- static inline size_t apply(internal_node & n, Indexable const& indexable, size_t /*node_relative_level*/)
+ static inline size_t apply(internal_node & n,
+ Indexable const& indexable,
+ parameters_type const& /*parameters*/,
+ size_t /*node_relative_level*/)
{
children_type & children = rtree::elements(n);
@@ -107,12 +112,12 @@
class split<Value, Options, Translator, Box, Allocators, split_default_tag>
{
protected:
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
-
typedef typename Options::parameters_type parameters_type;
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+
public:
typedef index::pushable_array<std::pair<Box, node*>, 1> nodes_container_type;
@@ -120,7 +125,8 @@
static inline void apply(nodes_container_type & additional_nodes,
Node & n,
Box & n_box,
- Translator const& tr,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators)
{
// create additional node
@@ -130,14 +136,14 @@
// redistribute elements
Box box2;
redistribute_elements<Value, Options, Translator, Box, Allocators, typename Options::redistribute_tag>::
- apply(n, n2, n_box, box2, tr);
+ apply(n, n2, n_box, box2, parameters, translator);
// check numbers of elements
- BOOST_GEOMETRY_INDEX_ASSERT(parameters_type::min_elements <= rtree::elements(n).size() &&
- rtree::elements(n).size() <= parameters_type::max_elements,
+ BOOST_GEOMETRY_INDEX_ASSERT(parameters.get_min_elements() <= rtree::elements(n).size() &&
+ rtree::elements(n).size() <= parameters.get_max_elements(),
"unexpected number of elements");
- BOOST_GEOMETRY_INDEX_ASSERT(parameters_type::min_elements <= rtree::elements(n2).size() &&
- rtree::elements(n2).size() <= parameters_type::max_elements,
+ BOOST_GEOMETRY_INDEX_ASSERT(parameters.get_min_elements() <= rtree::elements(n2).size() &&
+ rtree::elements(n2).size() <= parameters.get_max_elements(),
"unexpected number of elements");
additional_nodes.push_back(std::make_pair(box2, second_node));
@@ -153,21 +159,23 @@
, index::nonassignable
{
protected:
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
-
typedef typename Options::parameters_type parameters_type;
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+
inline insert(node* & root,
size_t & leafs_level,
Element const& element,
- Translator const& t,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level = 0
)
: m_element(element)
- , m_tr(t)
+ , m_parameters(parameters)
+ , m_translator(translator)
, m_relative_level(relative_level)
, m_level(leafs_level - relative_level)
, m_root_node(root)
@@ -189,12 +197,12 @@
{
// choose next node
size_t choosen_node_index = detail::choose_next_node<Value, Options, Box, Allocators, typename Options::choose_next_node_tag>::
- apply(n, rtree::element_indexable(m_element, m_tr), m_leafs_level - m_current_level);
+ apply(n, rtree::element_indexable(m_element, m_translator), m_parameters, m_leafs_level - m_current_level);
// expand the node to contain value
geometry::expand(
rtree::elements(n)[choosen_node_index].first,
- rtree::element_indexable(m_element, m_tr));
+ rtree::element_indexable(m_element, m_translator));
// next traversing step
traverse_apply_visitor(visitor, n, choosen_node_index);
@@ -209,7 +217,7 @@
"if node isn't the root current_child_index should be valid");
// handle overflow
- if ( parameters_type::max_elements < rtree::elements(n).size() )
+ if ( m_parameters.get_max_elements() < rtree::elements(n).size() )
{
split(n);
}
@@ -247,7 +255,7 @@
typename split_algo::nodes_container_type additional_nodes;
Box n_box;
- split_algo::apply(additional_nodes, n, n_box, m_tr, m_allocators);
+ split_algo::apply(additional_nodes, n, n_box, m_parameters, m_translator, m_allocators);
BOOST_GEOMETRY_INDEX_ASSERT(additional_nodes.size() == 1, "unexpected number of additional nodes");
@@ -287,7 +295,8 @@
// TODO: awulkiew - implement dispatchable split::apply to enable additional nodes creation
Element const& m_element;
- Translator const& m_tr;
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
const size_t m_relative_level;
const size_t m_level;
@@ -318,14 +327,17 @@
typedef typename base::internal_node internal_node;
typedef typename base::leaf leaf;
+ typedef typename Options::parameters_type parameters_type;
+
inline insert(node* & root,
size_t & leafs_level,
Element const& element,
- Translator const& tr,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level = 0
)
- : base(root, leafs_level, element, tr, allocators, relative_level)
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
{}
inline void operator()(internal_node & n)
@@ -364,14 +376,17 @@
typedef typename base::internal_node internal_node;
typedef typename base::leaf leaf;
+ typedef typename Options::parameters_type parameters_type;
+
inline insert(node* & root,
size_t & leafs_level,
- Value const& v,
- Translator const& t,
+ Value const& value,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators,
size_t relative_level = 0
)
- : base(root, leafs_level, v, t, allocators, relative_level)
+ : base(root, leafs_level, value, parameters, translator, allocators, relative_level)
{}
inline void operator()(internal_node & n)
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/nearest.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -157,9 +157,11 @@
, index::nonassignable
{
public:
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+ typedef typename Options::parameters_type parameters_type;
+
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
typedef index::detail::distances_calc<DistancesPredicates, Box, rtree::node_tag> node_distances_calc;
typedef typename node_distances_calc::result_type node_distances_type;
@@ -177,8 +179,9 @@
rtree::value_tag
> value_distances_predicates_check;
- inline nearest(Translator const& t, DistancesPredicates const& dist_pred, Predicates const& pred, Result & r)
- : m_tr(t), m_dist_pred(dist_pred), m_pred(pred)
+ inline nearest(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)
{}
@@ -186,13 +189,15 @@
inline void operator()(internal_node const& n)
{
- // array of active nodes
- index::pushable_array<
- std::pair<node_distances_type, const node *>,
- Options::parameters_type::max_elements
- > active_branch_list;
-
typedef typename rtree::elements_type<internal_node>::type elements_type;
+
+ // array of active nodes
+ typename index::detail::rtree::container_from_elements_type<
+ elements_type,
+ std::pair<node_distances_type, const node *>
+ >::type active_branch_list;
+ active_branch_list.reserve(m_parameters.get_max_elements());
+
elements_type const& elements = rtree::elements(n);
// fill array of nodes meeting predicates
@@ -256,10 +261,10 @@
it != elements.end(); ++it)
{
// if value meets predicates
- if ( index::predicates_check<rtree::value_tag>(m_pred, *it, m_tr(*it)) )
+ if ( index::predicates_check<rtree::value_tag>(m_pred, *it, m_translator(*it)) )
{
// calculate values distance for distance predicate
- value_distances_type distances = value_distances_calc::apply(m_dist_pred, m_tr(*it));
+ value_distances_type distances = value_distances_calc::apply(m_dist_pred, m_translator(*it));
// TODO: awulkiew - consider at first calculating point relation distance only,
// comparing it with m_result.comparable_distance if it's valid,
@@ -316,7 +321,8 @@
::template get<index::detail::near_tag>(d);
}
- Translator const& m_tr;
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
DistancesPredicates const& m_dist_pred;
Predicates const& m_pred;
Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/remove.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/remove.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/visitors/remove.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -27,20 +27,22 @@
: public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
, index::nonassignable
{
- typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
- typedef typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
- typedef typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
-
typedef typename Options::parameters_type parameters_type;
+ typedef typename rtree::node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+ typedef typename rtree::internal_node<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type internal_node;
+ typedef typename rtree::leaf<Value, parameters_type, Box, Allocators, typename Options::node_tag>::type leaf;
+
public:
inline remove(node* & root,
size_t & leafs_level,
- Value const& v,
- Translator const& t,
+ Value const& value,
+ parameters_type const& parameters,
+ Translator const& translator,
Allocators & allocators)
- : m_value(v)
- , m_tr(t)
+ : m_value(value)
+ , m_parameters(parameters)
+ , m_translator(translator)
, m_allocators(allocators)
, m_root_node(root)
, m_leafs_level(leafs_level)
@@ -63,7 +65,7 @@
size_t child_node_index = 0;
for ( ; child_node_index < children.size() ; ++child_node_index )
{
- if ( geometry::covered_by(m_tr(m_value), children[child_node_index].first) )
+ if ( geometry::covered_by(m_translator(m_value), children[child_node_index].first) )
{
// next traversing step
traverse_apply_visitor(n, child_node_index);
@@ -90,7 +92,7 @@
elements.erase(underfl_el_it);
// calc underflow
- m_is_underflow = elements.size() < parameters_type::min_elements;
+ m_is_underflow = elements.size() < m_parameters.get_min_elements();
}
// n is not root - adjust aabb
@@ -99,10 +101,10 @@
// underflow state should be ok here
// note that there may be less than min_elems elements in root
// so this condition should be checked only here
- assert((elements.size() < parameters_type::min_elements) == m_is_underflow);
+ BOOST_GEOMETRY_INDEX_ASSERT((elements.size() < m_parameters.get_min_elements()) == m_is_underflow, "unexpected state");
rtree::elements(*m_parent)[m_current_child_index].first
- = rtree::elements_box<Box>(elements.begin(), elements.end(), m_tr);
+ = rtree::elements_box<Box>(elements.begin(), elements.end(), m_translator);
}
// n is root node
else
@@ -152,7 +154,7 @@
// find value and remove it
for ( typename elements_type::iterator it = elements.begin() ; it != elements.end() ; ++it )
{
- if ( m_tr.equals(*it, m_value) )
+ if ( m_translator.equals(*it, m_value) )
{
elements.erase(it);
m_is_value_removed = true;
@@ -164,13 +166,13 @@
if ( m_is_value_removed )
{
// calc underflow
- m_is_underflow = elements.size() < parameters_type::min_elements;
+ m_is_underflow = elements.size() < m_parameters.get_min_elements();
// n is not root - adjust aabb
if ( 0 != m_parent )
{
rtree::elements(*m_parent)[m_current_child_index].first
- = rtree::elements_box<Box>(elements.begin(), elements.end(), m_tr);
+ = rtree::elements_box<Box>(elements.begin(), elements.end(), m_translator);
}
}
}
@@ -216,7 +218,8 @@
m_root_node,
m_leafs_level,
*it,
- m_tr,
+ m_parameters,
+ m_translator,
m_allocators,
node_relative_level - 1);
@@ -225,7 +228,8 @@
}
Value const& m_value;
- Translator const& m_tr;
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
Allocators & m_allocators;
node* & m_root_node;
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/introduction.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/introduction.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/introduction.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -39,7 +39,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -63,7 +63,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/introduction.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/introduction.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/introduction.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -36,7 +36,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -174,7 +174,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -170,7 +170,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -118,7 +118,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -124,7 +124,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez<p>
+<td align="right"><div class="copyright-footer">Copyright © 2008 Federico J. Fernandez<br>Copyright © 2011, 2012 Adam Wulkiewicz<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
Modified: sandbox-branches/geometry/index/doc/html/index.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/index.html (original)
+++ sandbox-branches/geometry/index/doc/html/index.html 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -23,12 +23,13 @@
<div><h2 class="title">
<a name="geometry"></a>Chapter 1. Geometry Index</h2></div>
<div><div class="author"><h3 class="author">
-<span class="firstname">Adam</span> <span class="surname">Wulkiewicz</span>
+<span class="firstname">Federico J.</span> <span class="surname">Fernandez</span>
</h3></div></div>
<div><div class="author"><h3 class="author">
-<span class="firstname">Federico J.</span> <span class="surname">Fernandez</span>
+<span class="firstname">Adam</span> <span class="surname">Wulkiewicz</span>
</h3></div></div>
-<div><p class="copyright">Copyright © 2011 Adam Wulkiewicz, Federico J. Fernandez</p></div>
+<div><p class="copyright">Copyright © 2008 Federico J. Fernandez</p></div>
+<div><p class="copyright">Copyright © 2011, 2012 Adam Wulkiewicz</p></div>
<div><div class="legalnotice">
<a name="geometry.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -53,7 +54,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: August 23, 2012 at 21:48:12 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 26, 2012 at 00:37:38 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox-branches/geometry/index/doc/index.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/index.qbk (original)
+++ sandbox-branches/geometry/index/doc/index.qbk 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -10,8 +10,8 @@
[library Geometry Index
[quickbook 1.5]
- [authors [Wulkiewicz, Adam], [Fernandez, Federico J.]]
- [copyright 2011 Adam Wulkiewicz, Federico J. Fernandez]
+ [authors [Fernandez, Federico J.], [Wulkiewicz, Adam]]
+ [copyright 2008 Federico J. Fernandez, 2011-2012 Adam Wulkiewicz]
[purpose Documentation of Boost.Geometry Index library]
[license
Distributed under the Boost Software License, Version 1.0.
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
test_rtree<P2dc, bgi::linear<4, 2> >();
+ test_rtree<P2dc>(bgi::runtime::linear(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
test_rtree<P2fc, bgi::linear<4, 2> >();
+ test_rtree<P2fc>(bgi::runtime::linear(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
test_rtree<P2ic, bgi::linear<4, 2> >();
+ test_rtree<P2ic>(bgi::runtime::linear(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,8 @@
typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
test_rtree<P2ttmc, bgi::linear<4, 2> >();
+ test_rtree<P2ttmc>(bgi::runtime::linear(4, 2));
+
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
test_rtree<P2dc, bgi::quadratic<4, 2> >();
+ test_rtree<P2dc>(bgi::runtime::quadratic(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
test_rtree<P2fc, bgi::quadratic<4, 2> >();
+ test_rtree<P2fc>(bgi::runtime::quadratic(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
test_rtree<P2ic, bgi::quadratic<4, 2> >();
+ test_rtree<P2ic>(bgi::runtime::quadratic(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,7 @@
typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
test_rtree<P2ttmc, bgi::quadratic<4, 2> >();
+ test_rtree<P2ttmc>(bgi::runtime::quadratic(4, 2));
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
test_rtree<P2dc, bgi::rstar<4, 2> >();
+ test_rtree<P2dc>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
test_rtree<P2fc, bgi::rstar<4, 2> >();
+ test_rtree<P2fc>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
test_rtree<P2ic, bgi::rstar<4, 2> >();
+ test_rtree<P2ic>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,7 @@
typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
test_rtree<P2ttmc, bgi::rstar<4, 2> >();
+ test_rtree<P2ttmc>(bgi::runtime::rstar(4, 2));
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
test_rtree<P3dc, bgi::linear<4, 2> >();
+ test_rtree<P3dc>(bgi::runtime::linear(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
test_rtree<P3fc, bgi::linear<4, 2> >();
+ test_rtree<P3fc>(bgi::runtime::linear(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
test_rtree<P3ic, bgi::linear<4, 2> >();
-
+ test_rtree<P3ic>(bgi::runtime::linear(4, 2));
+
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,7 @@
typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
test_rtree<P3ttmc, bgi::linear<4, 2> >();
+ test_rtree<P3ttmc>(bgi::runtime::linear(4, 2));
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
test_rtree<P3dc, bgi::quadratic<4, 2> >();
+ test_rtree<P3dc>(bgi::runtime::quadratic(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
test_rtree<P3fc, bgi::quadratic<4, 2> >();
+ test_rtree<P3fc>(bgi::runtime::quadratic(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
test_rtree<P3ic, bgi::quadratic<4, 2> >();
-
+ test_rtree<P3ic>(bgi::runtime::quadratic(4, 2));
+
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,7 @@
typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
test_rtree<P3ttmc, bgi::quadratic<4, 2> >();
+ test_rtree<P3ttmc>(bgi::runtime::quadratic(4, 2));
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
test_rtree<P3dc, bgi::rstar<4, 2> >();
+ test_rtree<P3dc>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
test_rtree<P3fc, bgi::rstar<4, 2> >();
+ test_rtree<P3fc>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -18,6 +18,7 @@
typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
test_rtree<P3ic, bgi::rstar<4, 2> >();
+ test_rtree<P3ic>(bgi::runtime::rstar(4, 2));
return 0;
}
Modified: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -20,6 +20,7 @@
typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
test_rtree<P3ttmc, bgi::rstar<4, 2> >();
+ test_rtree<P3ttmc>(bgi::runtime::rstar(4, 2));
#endif
return 0;
Modified: sandbox-branches/geometry/index/test/rtree/test_rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_rtree.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_rtree.hpp 2012-08-25 20:41:11 EDT (Sat, 25 Aug 2012)
@@ -487,14 +487,20 @@
// rtree copying and moving
template <typename Value, typename Algo, typename Box>
-void test_copy_assignment_move(bgi::rtree<Value, Algo> & tree, Box const& qbox)
+void test_copy_assignment_move(bgi::rtree<Value, Algo> const& tree, Box const& qbox)
{
+ size_t s = tree.size();
+
+ BOOST_CHECK(s);
+
std::vector<Value> expected_output;
tree.query(qbox, std::back_inserter(expected_output));
// copy constructor
bgi::rtree<Value, Algo> t1(tree);
+ BOOST_CHECK(tree.size() == t1.size());
+
std::vector<Value> output;
t1.query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t1, output, expected_output);
@@ -502,35 +508,65 @@
// copying assignment operator
t1 = tree;
+ BOOST_CHECK(tree.size() == t1.size());
+
output.clear();
t1.query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t1, output, expected_output);
// moving constructor
- bgi::rtree<Value, Algo> t2(boost::move(tree));
+ bgi::rtree<Value, Algo> t2(boost::move(t1));
+
+ BOOST_CHECK(t2.size() == s);
+ BOOST_CHECK(t1.size() == 0);
output.clear();
t2.query(qbox, std::back_inserter(output));
test_exactly_the_same_outputs(t2, output, expected_output);
// moving assignment operator
- t2 = boost::move(t1);
+ t1 = boost::move(t2);
+
+ BOOST_CHECK(t1.size() == s);
+ BOOST_CHECK(t2.size() == 0);
output.clear();
- t2.query(qbox, std::back_inserter(output));
- test_exactly_the_same_outputs(t2, output, expected_output);
+ t1.query(qbox, std::back_inserter(output));
+ test_exactly_the_same_outputs(t1, output, expected_output);
+}
+
+// rtree removing
+
+template <typename Value, typename Algo, typename Box>
+void test_remove(bgi::rtree<Value, Algo> & tree, Box const& qbox)
+{
+ size_t prev_size = tree.size();
+
+ std::vector<Value> output;
+ tree.query(qbox, std::back_inserter(output));
+
+ BOOST_CHECK(0 < output.size());
+
+ tree.remove(output.begin(), output.end());
+
+ BOOST_CHECK(tree.size() == prev_size - output.size());
+
+ output.clear();
+ tree.query(qbox, std::back_inserter(output));
+
+ BOOST_CHECK(0 == output.size());
}
// run all tests for a single Algorithm and single rtree
// defined by Value
-template <typename Value, typename Algo>
-void test_rtree_by_value()
+template <typename Value, typename Parameters>
+void test_rtree_by_value(Parameters const& parameters)
{
- typedef bgi::rtree<Value, Algo> Tree;
+ typedef bgi::rtree<Value, Parameters> Tree;
typedef typename Tree::box_type B;
- Tree tree;
+ Tree tree(parameters);
std::vector<Value> input;
B qbox;
@@ -550,22 +586,24 @@
test_nearest_k(tree, input, pt, 10);
test_copy_assignment_move(tree, qbox);
+
+ test_remove(tree, qbox);
}
// run all tests for one Algorithm for some number of rtrees
// defined by some number of Values constructed from given Point
-template<typename Point, typename Algo>
-void test_rtree()
+template<typename Point, typename Parameters>
+void test_rtree(Parameters const& parameters = Parameters())
{
typedef bg::model::box<Point> Box;
typedef std::pair<Box, int> PairB;
typedef std::pair<Point, int> PairP;
- test_rtree_by_value<Point, Algo>();
- test_rtree_by_value<Box, Algo>();
- test_rtree_by_value<PairB, Algo>();
- test_rtree_by_value<PairP, Algo>();
+ test_rtree_by_value<Point, Parameters>(parameters);
+ test_rtree_by_value<Box, Parameters>(parameters);
+ test_rtree_by_value<PairB, Parameters>(parameters);
+ test_rtree_by_value<PairP, Parameters>(parameters);
}
#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk