|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83912 - trunk/boost/geometry/index/detail/rtree/visitors
From: adam.wulkiewicz_at_[hidden]
Date: 2013-04-14 20:47:47
Author: awulkiew
Date: 2013-04-14 20:47:46 EDT (Sun, 14 Apr 2013)
New Revision: 83912
URL: http://svn.boost.org/trac/boost/changeset/83912
Log:
geometry.index rtree: Added commented out preliminary version of incremental spatial query visitor.
Text files modified:
trunk/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp | 60 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
Modified: trunk/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp (original)
+++ trunk/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp 2013-04-14 20:47:46 EDT (Sun, 14 Apr 2013)
@@ -75,6 +75,66 @@
size_type found_count;
};
+//template <typename Value, typename Options, typename Translator, typename Box, typename Allocators, typename Predicates, typename OutIter>
+//struct spatial_query_incremental
+// : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+//{
+// 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 Allocators::size_type size_type;
+// typedef typename Allocators::node_pointer node_pointer;
+//
+// static const unsigned predicates_len = index::detail::predicates_length<Predicates>::value;
+//
+// inline spatial_query_incremental(Translator const& t, Predicates const& p)
+// : tr(t), pred(p)
+// {}
+//
+// inline void operator()(internal_node const& n)
+// {
+// typedef typename rtree::elements_type<internal_node>::type elements_type;
+// elements_type const& elements = rtree::elements(n);
+//
+// internal_stack.push_back(std::make_pair(elements.begin(), elements.end()));
+//
+// //// if node meets predicates
+// //// 0 - dummy value
+// //if ( index::detail::predicates_check<index::detail::bounds_tag, 0, predicates_len>(pred, 0, internal_stack.back().first->first) )
+// //{
+// // nodes.push_back(it->second);
+// // rtree::apply_visitor(*this, *it->second);
+// //}
+// }
+//
+// inline void operator()(leaf const& n)
+// {
+// typedef typename rtree::elements_type<leaf>::type elements_type;
+// elements_type const& elements = rtree::elements(n);
+//
+// leaf_range.push_back(std::make_pair(elements.begin(), elements.end()));
+//
+// //// if value meets predicates
+// //if ( index::detail::predicates_check<index::detail::value_tag, 0, predicates_len>(pred, *it, tr(*it)) )
+// //{
+// // out_iter = *it;
+// // ++out_iter;
+//
+// // ++found_count;
+// //}
+// }
+//
+// Translator const& tr;
+// Predicates pred;
+//
+// typedef typename rtree::elements_type<internal_node>::type::const_iterator internal_iterator;
+// typedef typename rtree::elements_type<leaf>::type::const_iterator leaf_iterator;
+//
+// std::vector< std::pair<internal_iterator, internal_iterator> > internal_stack;
+// std::pair<leaf_iterator, leaf_iterator> leaf_range;
+//};
+
}}} // namespace detail::rtree::visitors
}}} // namespace boost::geometry::index
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