|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74678 - in sandbox-branches/geometry/index: boost/geometry/extensions/index/rtree tests
From: adam.wulkiewicz_at_[hidden]
Date: 2011-10-03 16:59:45
Author: awulkiew
Date: 2011-10-03 16:59:44 EDT (Mon, 03 Oct 2011)
New Revision: 74678
URL: http://svn.boost.org/trac/boost/changeset/74678
Log:
Allocator default constructor as default rtree parameter fixed.
Text files modified:
sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/rtree.hpp | 4 +++-
sandbox-branches/geometry/index/tests/additional_glut_vis.cpp | 10 ++++++----
sandbox-branches/geometry/index/tests/additional_sizes_and_times.cpp | 13 ++++++++++++-
3 files changed, 21 insertions(+), 6 deletions(-)
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 2011-10-03 16:59:44 EDT (Mon, 03 Oct 2011)
@@ -59,6 +59,8 @@
// TODO change remove() to erase() or just add erase() ?
// erase works on iterators of this container so this may be confusing with remove(ValIt, ValIt)
+// bgi::near and bgi::far conflicts with WINDOWS macros!!!
+
template <
typename Value,
typename Parameters,
@@ -85,7 +87,7 @@
typedef typename detail::rtree::internal_node<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type internal_node;
typedef typename detail::rtree::leaf<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type leaf;
- inline explicit rtree(translator_type const& translator = translator_type(), Allocator allocator = std::allocator<value_type>())
+ inline explicit rtree(translator_type const& translator = translator_type(), Allocator allocator = Allocator())
: m_values_count(0)
, m_root(0)
, m_leafs_level(0)
Modified: sandbox-branches/geometry/index/tests/additional_glut_vis.cpp
==============================================================================
--- sandbox-branches/geometry/index/tests/additional_glut_vis.cpp (original)
+++ sandbox-branches/geometry/index/tests/additional_glut_vis.cpp 2011-10-03 16:59:44 EDT (Mon, 03 Oct 2011)
@@ -25,7 +25,8 @@
bgi::rtree<
B,
- bgi::rstar<4, 2> > t;
+ bgi::rstar<4, 2>
+> t;
std::vector<B> vect;
size_t found_count = 0;
@@ -51,9 +52,10 @@
nearest_boxes.clear();
found_count = t.nearest(
bgi::bounded(
- search_point,
- bgi::far(min_distance),
- bgi::near(max_distance)),
+ search_point,
+ bgi::far(min_distance),
+ bgi::near(max_distance)
+ ),
count,
std::back_inserter(nearest_boxes)
);
Modified: sandbox-branches/geometry/index/tests/additional_sizes_and_times.cpp
==============================================================================
--- sandbox-branches/geometry/index/tests/additional_sizes_and_times.cpp (original)
+++ sandbox-branches/geometry/index/tests/additional_sizes_and_times.cpp 2011-10-03 16:59:44 EDT (Mon, 03 Oct 2011)
@@ -20,6 +20,12 @@
#include <boost/foreach.hpp>
#include <boost/random.hpp>
+/*#include <boost/pool/pool_alloc.hpp>
+#undef near
+#undef far
+#undef min
+#undef max*/
+
template <typename V>
struct test_pred
{
@@ -39,7 +45,12 @@
//typedef bg::model::d2::point_xy<double> P;
typedef bg::model::point<double, 2, bg::cs::cartesian> P;
typedef bg::model::box<P> B;
- typedef bgi::rtree<std::pair<B, size_t>, bgi::linear<32, 8> > RT;
+ typedef bgi::rtree<
+ std::pair<B, size_t>,
+ bgi::linear<32, 8>,
+ bgi::translator::def< std::pair<B, size_t> >/*,
+ boost::fast_pool_allocator< std::pair<B, size_t> >*/
+ > RT;
//typedef bgi::rtree<std::pair<B, size_t>, bgi::quadratic<32, 8> > RT;
//typedef bgi::rtree<std::pair<B, size_t>, bgi::rstar<32, 8> > RT;
/*typedef bgi::rtree<
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