Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82536 - in sandbox-branches/geometry/index: boost/geometry/extensions/index boost/geometry/extensions/index/detail boost/geometry/extensions/index/detail/rtree boost/geometry/extensions/index/detail/rtree/kmeans boost/geometry/extensions/index/detail/rtree/linear boost/geometry/extensions/index/detail/rtree/node boost/geometry/extensions/index/detail/rtree/quadratic boost/geometry/extensions/index/detail/rtree/rstar boost/geometry/extensions/index/detail/rtree/visitors boost/geometry/extensions/index/rtree doc/generated doc/html doc/html/geometry_index doc/html/geometry_index/r_tree doc/src/examples doc/src/examples/rtree test test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-18 15:40:32


Author: awulkiew
Date: 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
New Revision: 82536
URL: http://svn.boost.org/trac/boost/changeset/82536

Log:
Files structure rearranged to better reflect namespace strcture. Some classes moved to different namespaces.
Added:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/assert.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/distance_predicates.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/nonassignable.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/predicates.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/pushable_array.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/adaptors.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/kmeans.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/split.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/linear.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/concept.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_auto_ptr.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_dynamic.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_static.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_dynamic.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_static.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/static_visitor.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/options.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/quadratic.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/choose_next_node.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/insert.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/rstar.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_boxes_ok.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_levels_ok.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/children_box.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/copy.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/count.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/destroy.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/gl_draw.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/nearest_query.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/print.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/remove.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/spatial_query.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/static_vector.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tags.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tuples.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/parameters.hpp (contents, props changed)
   sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp (contents, props changed)
   sandbox-branches/geometry/index/doc/src/examples/Jamfile.v2 (contents, props changed)
   sandbox-branches/geometry/index/doc/src/examples/rtree/Jamfile.v2 (contents, props changed)
Removed:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/assert.hpp
   sandbox-branches/geometry/index/boost/geometry/extensions/index/nonassignable.hpp
   sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp
   sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree/
   sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp
   sandbox-branches/geometry/index/boost/geometry/extensions/index/tuples.hpp
Text files modified:
   sandbox-branches/geometry/index/boost/geometry/extensions/index/distance_predicates.hpp | 644 ---------------------------
   sandbox-branches/geometry/index/boost/geometry/extensions/index/predicates.hpp | 343 --------------
   sandbox-branches/geometry/index/doc/generated/rtree.qbk | 90 +--
   sandbox-branches/geometry/index/doc/generated/rtree_linear.qbk | 2
   sandbox-branches/geometry/index/doc/generated/rtree_quadratic.qbk | 2
   sandbox-branches/geometry/index/doc/generated/rtree_rstar.qbk | 2
   sandbox-branches/geometry/index/doc/generated/rtree_runtime_linear.qbk | 2
   sandbox-branches/geometry/index/doc/generated/rtree_runtime_quadratic.qbk | 2
   sandbox-branches/geometry/index/doc/generated/rtree_runtime_rstar.qbk | 2
   sandbox-branches/geometry/index/doc/generated/translator_index.qbk | 3
   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/creation_and_modification.html | 10
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/introduction.html | 26
   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/reference.html | 925 +++++++++++++++------------------------
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html | 6
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html | 2
   sandbox-branches/geometry/index/doc/html/index.html | 4
   sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp | 2
   sandbox-branches/geometry/index/test/geometry_index_test_common.hpp | 2
   sandbox-branches/geometry/index/test/rtree/rtree_exceptions.cpp | 40
   sandbox-branches/geometry/index/test/rtree/test_rtree.hpp | 10
   sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp | 12
   sandbox-branches/geometry/index/test/rtree/test_throwing.hpp | 190 -------
   25 files changed, 466 insertions(+), 1861 deletions(-)

Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/assert.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/assert.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,27 +0,0 @@
-// Boost.Geometry Index
-//
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-//
-// Use, modification and distribution is subject to 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)
-
-#include <boost/assert.hpp>
-
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP
-
-#define BOOST_GEOMETRY_INDEX_ASSERT(CONDITION, TEXT_MSG) \
- BOOST_ASSERT_MSG(CONDITION, TEXT_MSG)
-
-#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG)
-
-#define BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(PARAM)
-
-#else
-
-#define BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(PARAM) PARAM
-
-#endif
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/assert.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/assert.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,27 @@
+// Boost.Geometry Index
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#include <boost/assert.hpp>
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP
+
+#define BOOST_GEOMETRY_INDEX_ASSERT(CONDITION, TEXT_MSG) \
+ BOOST_ASSERT_MSG(CONDITION, TEXT_MSG)
+
+#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG)
+
+#define BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(PARAM)
+
+#else
+
+#define BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(PARAM) PARAM
+
+#endif
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_ASSERT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/distance_predicates.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/distance_predicates.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,866 @@
+// Boost.Geometry Index
+//
+// Spatial index distance predicates, calculators and checkers
+// used in nearest query - specialized for envelopes
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_DISTANCE_PREDICATES_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_DISTANCE_PREDICATES_HPP
+
+#include <boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp>
+#include <boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp>
+#include <boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp>
+
+#include <boost/geometry/extensions/index/detail/tuples.hpp>
+
+#include <boost/geometry/extensions/index/detail/tags.hpp>
+
+// TODO - optimization
+// For Boxes and Points all types of distances may be calculated
+// - near, far and centroid. For points those are the same distance
+// calculate them for Boxes only!
+// for Points calculate only 1 distance
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+// ------------------------------------------------------------------ //
+// relations
+// ------------------------------------------------------------------ //
+
+template <typename T>
+struct to_nearest
+{
+ to_nearest(T const& v) : value(v) {}
+ T value;
+};
+
+template <typename T>
+struct to_centroid
+{
+ to_centroid(T const& v) : value(v) {}
+ T value;
+};
+
+template <typename T>
+struct to_furthest
+{
+ to_furthest(T const& v) : value(v) {}
+ T value;
+};
+
+// tags
+
+struct to_nearest_tag {};
+struct to_centroid_tag {};
+struct to_furthest_tag {};
+
+// ------------------------------------------------------------------ //
+// relation traits and access
+// ------------------------------------------------------------------ //
+
+template <typename T>
+struct relation
+{
+ typedef T value_type;
+ typedef to_nearest_tag tag;
+ static inline T const& value(T const& v) { return v; }
+ static inline T & value(T & v) { return v; }
+};
+
+template <typename T>
+struct relation< to_nearest<T> >
+{
+ typedef T value_type;
+ typedef to_nearest_tag tag;
+ static inline T const& value(to_nearest<T> const& r) { return r.value; }
+ static inline T & value(to_nearest<T> & r) { return r.value; }
+};
+
+template <typename T>
+struct relation< to_centroid<T> >
+{
+ typedef T value_type;
+ typedef to_centroid_tag tag;
+ static inline T const& value(to_centroid<T> const& r) { return r.value; }
+ static inline T & value(to_centroid<T> & r) { return r.value; }
+};
+
+template <typename T>
+struct relation< to_furthest<T> >
+{
+ typedef T value_type;
+ typedef to_furthest_tag tag;
+ static inline T const& value(to_furthest<T> const& r) { return r.value; }
+ static inline T & value(to_furthest<T> & r) { return r.value; }
+};
+
+// ------------------------------------------------------------------ //
+// distance predicates
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation>
+struct unbounded
+ : nonassignable
+{
+ inline explicit unbounded(PointRelation const& pr)
+ : point_relation(pr)
+ {}
+
+ PointRelation point_relation;
+};
+
+template <typename PointRelation, typename MinRelation>
+struct min_bounded
+ : nonassignable
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
+
+ inline min_bounded(PointRelation const& pr, MinRelation const& min_rel)
+ : point_relation(pr)
+ , comparable_min(
+ relation<MinRelation>::value(min_rel) *
+ relation<MinRelation>::value(min_rel) )
+ {}
+
+ PointRelation point_relation;
+ distance_type comparable_min;
+};
+
+template <typename PointRelation, typename MaxRelation>
+struct max_bounded
+ : nonassignable
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
+
+ inline max_bounded(PointRelation const& pr, MaxRelation const& max_rel)
+ : point_relation(pr)
+ , comparable_max(
+ relation<MaxRelation>::value(max_rel) *
+ relation<MaxRelation>::value(max_rel) )
+ {}
+
+ PointRelation point_relation;
+ distance_type comparable_max;
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation>
+struct bounded
+ : nonassignable
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
+
+ inline bounded(PointRelation const& pr, MinRelation const& min_rel, MaxRelation const& max_rel)
+ : point_relation(pr)
+ , comparable_min(
+ relation<MinRelation>::value(min_rel) *
+ relation<MinRelation>::value(min_rel) )
+ , comparable_max(
+ relation<MaxRelation>::value(max_rel) *
+ relation<MaxRelation>::value(max_rel) )
+ {}
+
+ PointRelation point_relation;
+ distance_type comparable_min;
+ distance_type comparable_max;
+};
+
+// ------------------------------------------------------------------ //
+// point_relation trait
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation>
+struct point_relation
+{
+ typedef PointRelation type;
+};
+
+template <typename PointRelation>
+struct point_relation< detail::unbounded<PointRelation> >
+{
+ typedef PointRelation type;
+};
+
+template <typename PointRelation, typename MinRelation>
+struct point_relation< detail::min_bounded<PointRelation, MinRelation> >
+{
+ typedef PointRelation type;
+};
+
+template <typename PointRelation, typename MaxRelation>
+struct point_relation< detail::max_bounded<PointRelation, MaxRelation> >
+{
+ typedef PointRelation type;
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation>
+struct point_relation< detail::bounded<PointRelation, MinRelation, MaxRelation> >
+{
+ typedef PointRelation type;
+};
+
+// ------------------------------------------------------------------ //
+// helpers
+// ------------------------------------------------------------------ //
+
+// algorithms
+
+// cdist
+
+template <typename T, typename Tag>
+struct cdist
+{
+ T value;
+};
+
+// cdist_merge
+
+template <typename CDistTuple, typename CDist>
+struct cdist_merge
+{
+ typedef typename detail::tuples::add_unique<
+ CDistTuple,
+ CDist
+ >::type type;
+};
+
+template <typename T, typename Tag, typename OtherTag>
+struct cdist_merge<
+ cdist<T, Tag>,
+ cdist<T, OtherTag> >
+{
+ typedef boost::tuple<
+ cdist<T, Tag>,
+ cdist<T, OtherTag>
+ > type;
+};
+
+template <typename T, typename Tag>
+struct cdist_merge<
+ cdist<T, Tag>,
+ cdist<T, Tag> >
+{
+ typedef cdist<T, Tag> type;
+};
+
+// cdist_value_type
+
+template <typename CDistTuple>
+struct cdist_value
+{
+ typedef typename cdist_value<
+ typename boost::tuples::element<0, CDistTuple>::type
+ >::type type;
+
+ template <typename Tag>
+ static inline type & get(CDistTuple & cdtup)
+ {
+ return boost::get<
+ tuples::find_index<
+ CDistTuple,
+ cdist<type, Tag>
+ >::value
+ >(cdtup).value;
+ }
+
+ template <typename Tag>
+ static inline type const& get(CDistTuple const& cdtup)
+ {
+ return boost::get<
+ tuples::find_index<
+ CDistTuple,
+ cdist<type, Tag>
+ >::value
+ >(cdtup).value;
+ }
+};
+
+template <typename T, typename Tag>
+struct cdist_value<
+ cdist<T, Tag>
+>
+{
+ typedef T type;
+
+ template <typename Tag2>
+ static inline type & get(cdist<T, Tag> & cd)
+ {
+ BOOST_MPL_ASSERT_MSG(
+ (tuples::equal< cdist<T, Tag2>, cdist<T, Tag> >::value),
+ TAGS_DO_NOT_MATCH,
+ (cdist_value));
+
+ return cd.value;
+ }
+
+ template <typename Tag2>
+ static inline type const& get(cdist<T, Tag> const& cd)
+ {
+ BOOST_MPL_ASSERT_MSG(
+ (tuples::equal< cdist<T, Tag2>, cdist<T, Tag> >::value),
+ TAGS_DO_NOT_MATCH,
+ (cdist_value));
+
+ return cd.value;
+ }
+};
+
+// distances_calc_impl_rel
+
+template <typename RelDist>
+struct distances_calc_impl_rel
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_RELATION,
+ (distances_calc_impl_rel));
+};
+
+template <typename T>
+struct distances_calc_impl_rel<
+ cdist<T, detail::to_nearest_tag>
+>
+{
+ template <typename Point, typename Indexable>
+ typename geometry::default_distance_result<Point, Indexable>::type
+ static inline apply(Point const& p, Indexable const& i)
+ {
+ return index::comparable_distance_near(p, i);
+ }
+};
+
+template <typename T>
+struct distances_calc_impl_rel<
+ cdist<T, detail::to_centroid_tag>
+>
+{
+ template <typename Point, typename Indexable>
+ typename geometry::default_distance_result<Point, Indexable>::type
+ static inline apply(Point const& p, Indexable const& i)
+ {
+ return index::comparable_distance_centroid(p, i);
+ }
+};
+
+template <typename T>
+struct distances_calc_impl_rel<
+ cdist<T, detail::to_furthest_tag>
+>
+{
+ template <typename Point, typename Indexable>
+ typename geometry::default_distance_result<Point, Indexable>::type
+ static inline apply(Point const& p, Indexable const& i)
+ {
+ return index::comparable_distance_far(p, i);
+ }
+};
+
+// distances_calc_impl_tuple
+
+template <typename Distances, typename Point, typename Indexable, size_t N>
+struct distances_calc_impl_tuple
+{
+ // TODO MPL ASSERT 0 < N
+ static inline void apply(Distances & d, Point const& p, Indexable const&i)
+ {
+ boost::get<N - 1>(d).value =
+ distances_calc_impl_rel<
+ typename boost::tuples::element<N - 1, Distances>::type
+ >::apply(p, i);
+
+ distances_calc_impl_tuple<
+ Distances,
+ Point,
+ Indexable,
+ N - 1
+ >::apply(d, p, i);
+ }
+};
+
+template <typename Distances, typename Point, typename Indexable>
+struct distances_calc_impl_tuple<Distances, Point, Indexable, 1>
+{
+ static inline void apply(Distances & d, Point const& p, Indexable const&i)
+ {
+ boost::get<0>(d).value =
+ distances_calc_impl_rel<
+ typename boost::tuples::element<0, Distances>::type
+ >::apply(p, i);
+ }
+};
+
+// distances_calc_impl
+
+template <typename Distances, typename Point, typename Indexable>
+struct distances_calc_impl
+{
+ static inline void apply(Distances & d, Point const& p, Indexable const&i)
+ {
+ distances_calc_impl_tuple<
+ Distances,
+ Point,
+ Indexable,
+ boost::tuples::length<Distances>::value
+ >::apply(d, p, i);
+ }
+};
+
+template <typename T, typename Tag, typename Point, typename Indexable>
+struct distances_calc_impl<
+ cdist<T, Tag>,
+ Point,
+ Indexable
+>
+{
+ static inline void apply(cdist<T, Tag> & d, Point const& p, Indexable const&i)
+ {
+ d.value = distances_calc_impl_rel<
+ cdist<T, Tag>
+ >::apply(p, i);
+ }
+};
+
+// ------------------------------------------------------------------ //
+// distance_calc and distances_predicates_check
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation, typename Indexable, typename Tag>
+struct distances_calc
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG,
+ (distances_calc));
+};
+
+template <typename PointRelation, typename Indexable, typename Tag>
+struct distances_predicates_check
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG,
+ (distances_predicates_check));
+};
+
+// ------------------------------------------------------------------ //
+// distance_calc for value_tag
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation, typename Indexable>
+struct distances_calc<PointRelation, Indexable, value_tag>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename detail::relation<PointRelation>::tag point_relation_tag;
+ typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
+
+ typedef detail::cdist<distance_type, point_relation_tag> result_type;
+
+ static inline result_type apply(PointRelation const& p, Indexable const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Indexable>
+ ::apply(res, relation<PointRelation>::value(p), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename Indexable>
+struct distances_calc<
+ detail::unbounded<PointRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename detail::relation<PointRelation>::tag point_relation_tag;
+ typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
+
+ typedef detail::cdist<distance_type, point_relation_tag> result_type;
+
+ static inline result_type apply(detail::unbounded<PointRelation> const& pp, Indexable const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Indexable>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename Indexable>
+struct distances_calc<
+ detail::min_bounded<PointRelation, MinRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename detail::relation<PointRelation>::tag point_relation_tag;
+ typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
+ typedef typename detail::relation<MinRelation>::tag min_relation_tag;
+
+ typedef typename detail::cdist_merge<
+ cdist<distance_type, point_relation_tag>,
+ cdist<distance_type, min_relation_tag>
+ >::type result_type;
+
+ static inline result_type apply(detail::min_bounded<PointRelation, MinRelation> const& pp, Indexable const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Indexable>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MaxRelation, typename Indexable>
+struct distances_calc<
+ detail::max_bounded<PointRelation, MaxRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename detail::relation<PointRelation>::tag point_relation_tag;
+ typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
+ typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
+
+ typedef typename detail::cdist_merge<
+ cdist<distance_type, point_relation_tag>,
+ cdist<distance_type, max_relation_tag>
+ >::type result_type;
+
+ static inline result_type apply(detail::max_bounded<PointRelation, MaxRelation> const& pp, Indexable const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Indexable>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Indexable>
+struct distances_calc<
+ detail::bounded<PointRelation, MinRelation, MaxRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename detail::relation<PointRelation>::tag point_relation_tag;
+ typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
+ typedef typename detail::relation<MinRelation>::tag min_relation_tag;
+ typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
+
+ typedef typename detail::cdist_merge<
+ typename detail::cdist_merge<
+ cdist<distance_type, point_relation_tag>,
+ cdist<distance_type, min_relation_tag>
+ >::type,
+ cdist<distance_type, max_relation_tag>
+ >::type result_type;
+
+ static inline result_type apply(
+ detail::bounded<PointRelation, MinRelation, MaxRelation> const& pp,
+ Indexable const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Indexable>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+// ------------------------------------------------------------------ //
+// distance_predicates_check for value_tag
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation, typename Indexable>
+struct distances_predicates_check<PointRelation, Indexable, value_tag>
+{
+ template <typename Distances>
+ static inline bool apply(PointRelation const&, Distances const&)
+ {
+ return true;
+ }
+};
+
+template <typename PointRelation, typename Indexable>
+struct distances_predicates_check<
+ detail::unbounded<PointRelation>,
+ Indexable,
+ value_tag
+>
+{
+ template <typename Distances>
+ static inline bool apply(detail::unbounded<PointRelation> const&, Distances const&)
+ {
+ return true;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename Indexable>
+struct distances_predicates_check<
+ detail::min_bounded<PointRelation, MinRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<MinRelation>::tag min_relation_tag;
+
+ template <typename Distances>
+ static inline bool apply(
+ detail::min_bounded<PointRelation, MinRelation> const& pred,
+ Distances const& d)
+ {
+ return pred.comparable_min <=
+ detail::cdist_value<Distances>::template get<min_relation_tag>(d);
+ }
+};
+
+template <typename PointRelation, typename MaxRelation, typename Indexable>
+struct distances_predicates_check<
+ detail::max_bounded<PointRelation, MaxRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
+
+ template <typename Distances>
+ static inline bool apply(
+ detail::max_bounded<PointRelation, MaxRelation> const& pred,
+ Distances const& d)
+ {
+ return pred.comparable_max <=
+ detail::cdist_value<Distances>::template get<max_relation_tag>(d);
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Indexable>
+struct distances_predicates_check<
+ detail::bounded<PointRelation, MinRelation, MaxRelation>,
+ Indexable,
+ value_tag
+>
+{
+ typedef typename detail::relation<MinRelation>::tag min_relation_tag;
+ typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
+
+ template <typename Distances>
+ static inline bool apply(
+ detail::bounded<PointRelation, MinRelation, MaxRelation> const& pred,
+ Distances const& d)
+ {
+ return pred.comparable_min
+ <= detail::cdist_value<Distances>::template get<min_relation_tag>(d)
+ && detail::cdist_value<Distances>::template get<max_relation_tag>(d)
+ <= pred.comparable_max;
+ }
+};
+
+// ------------------------------------------------------------------ //
+// distance_calc for envelope_tag
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation, typename Box>
+struct distances_calc<
+ PointRelation,
+ Box,
+ envelope_tag>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
+
+ typedef detail::cdist<distance_type, detail::to_nearest_tag> result_type;
+
+ static inline result_type apply(PointRelation const& p, Box const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Box>
+ ::apply(res, relation<PointRelation>::value(p), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename Box>
+struct distances_calc<
+ detail::unbounded<PointRelation>,
+ Box,
+ envelope_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
+
+ typedef detail::cdist<distance_type, detail::to_nearest_tag> result_type;
+
+ static inline result_type apply(detail::unbounded<PointRelation> const& pp, Box const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Box>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename Box>
+struct distances_calc<
+ detail::min_bounded<PointRelation, MinRelation>,
+ Box,
+ envelope_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
+
+ typedef typename detail::cdist_merge<
+ cdist<distance_type, detail::to_nearest_tag>,
+ cdist<distance_type, detail::to_furthest_tag>
+ >::type result_type;
+
+ static inline result_type apply(detail::min_bounded<PointRelation, MinRelation> const& pp, Box const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Box>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MaxRelation, typename Box>
+struct distances_calc<
+ detail::max_bounded<PointRelation, MaxRelation>,
+ Box,
+ envelope_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
+
+ typedef cdist<distance_type, detail::to_nearest_tag> result_type;
+
+ static inline result_type apply(detail::max_bounded<PointRelation, MaxRelation> const& pp, Box const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Box>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Box>
+struct distances_calc<
+ detail::bounded<PointRelation, MinRelation, MaxRelation>,
+ Box,
+ envelope_tag
+>
+{
+ typedef typename detail::relation<PointRelation>::value_type point_type;
+ typedef typename geometry::default_distance_result<point_type, Box>::type distance_type;
+
+ typedef typename detail::cdist_merge<
+ cdist<distance_type, detail::to_nearest_tag>,
+ cdist<distance_type, detail::to_furthest_tag>
+ >::type result_type;
+
+ static inline result_type apply(detail::bounded<PointRelation, MinRelation, MaxRelation> const& pp, Box const& i)
+ {
+ result_type res;
+ distances_calc_impl<result_type, point_type, Box>
+ ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
+ return res;
+ }
+};
+
+// ------------------------------------------------------------------ //
+// distance_predicates_check for envelope_tag
+// ------------------------------------------------------------------ //
+
+template <typename PointRelation, typename Box>
+struct distances_predicates_check<
+ PointRelation,
+ Box,
+ envelope_tag>
+{
+ template <typename Distances>
+ static inline bool apply(PointRelation const&, Distances const&)
+ {
+ return true;
+ }
+};
+
+template <typename PointRelation, typename Box>
+struct distances_predicates_check<
+ detail::unbounded<PointRelation>,
+ Box,
+ envelope_tag>
+{
+ template <typename Distances>
+ static inline bool apply(
+ detail::unbounded<PointRelation> const&,
+ Distances const&)
+ {
+ return true;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename Box>
+struct distances_predicates_check<
+ detail::min_bounded<PointRelation, MinRelation>,
+ Box,
+ envelope_tag>
+{
+ template <typename Distances>
+ static inline bool apply(
+ detail::min_bounded<PointRelation, MinRelation> const& pred,
+ Distances const& d)
+ {
+ return pred.comparable_min
+ <= cdist_value<Distances>::template get<detail::to_furthest_tag>(d);
+ }
+};
+
+template <typename PointRelation, typename MaxRelation, typename Box>
+struct distances_predicates_check<
+ detail::max_bounded<PointRelation, MaxRelation>,
+ Box,
+ envelope_tag>
+{
+ template <typename Distances>
+ static inline bool apply(
+ detail::max_bounded<PointRelation, MaxRelation> const& pred,
+ Distances const& d)
+ {
+ return cdist_value<Distances>::template get<detail::to_nearest_tag>(d)
+ <= pred.comparable_max;
+ }
+};
+
+template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Box>
+struct distances_predicates_check<
+ detail::bounded<PointRelation, MinRelation, MaxRelation>,
+ Box,
+ envelope_tag>
+{
+ template <typename Distances>
+ static inline bool apply(
+ detail::bounded<PointRelation, MinRelation, MaxRelation> const& pred,
+ Distances const& d)
+ {
+ return pred.comparable_min
+ <= cdist_value<Distances>::template get<detail::to_furthest_tag>(d)
+ && cdist_value<Distances>::template get<detail::to_nearest_tag>(d)
+ <= pred.comparable_max;
+ }
+};
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_DISTANCE_PREDICATES_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/nonassignable.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/nonassignable.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,23 @@
+// Boost.Geometry Index
+//
+// Nonassignable base class.
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+class nonassignable
+{
+ nonassignable & operator=(nonassignable const&);
+};
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/predicates.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/predicates.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,525 @@
+// Boost.Geometry Index
+//
+// Spatial query predicates definition and checks.
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_PREDICATES_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_PREDICATES_HPP
+
+#include <boost/geometry/extensions/index/predicates.hpp>
+#include <boost/geometry/extensions/index/detail/tags.hpp>
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+// ------------------------------------------------------------------ //
+// predicates
+// ------------------------------------------------------------------ //
+
+struct empty {};
+
+template <typename ValuePredicate>
+struct value
+{
+ value(ValuePredicate const& vpred) : value_predicate(vpred) {}
+ ValuePredicate value_predicate;
+};
+
+template <typename Geometry>
+struct covered_by
+{
+ covered_by(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct disjoint
+{
+ disjoint(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct intersects
+{
+ intersects(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct overlaps
+{
+ overlaps(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+//template <typename Geometry>
+//struct touches
+//{
+// touches(Geometry const& g) : geometry(g) {}
+// Geometry geometry;
+//};
+
+template <typename Geometry>
+struct within
+{
+ within(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct not_covered_by
+{
+ not_covered_by(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct not_disjoint
+{
+ not_disjoint(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct not_intersects
+{
+ not_intersects(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+template <typename Geometry>
+struct not_overlaps
+{
+ not_overlaps(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+//template <typename Geometry>
+//struct not_touches
+//{
+// not_touches(Geometry const& g) : geometry(g) {}
+// Geometry geometry;
+//};
+
+template <typename Geometry>
+struct not_within
+{
+ not_within(Geometry const& g) : geometry(g) {}
+ Geometry geometry;
+};
+
+// ------------------------------------------------------------------ //
+// predicate_check
+// ------------------------------------------------------------------ //
+
+template <typename Geometry, typename Tag>
+struct predicate_check
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG,
+ (predicate_check));
+};
+
+// ------------------------------------------------------------------ //
+// predicate_check for value
+// ------------------------------------------------------------------ //
+
+template <typename Geometry>
+struct predicate_check<Geometry, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(Geometry const& g, Value const&, Indexable const& i)
+ {
+ return geometry::intersects(i, g);
+ }
+};
+
+template <>
+struct predicate_check<empty, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(empty const&, Value const&, Indexable const&)
+ {
+ return true;
+ }
+};
+
+template <typename ValuePredicate>
+struct predicate_check<value<ValuePredicate>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(value<ValuePredicate> const& p, Value const& v, Indexable const&)
+ {
+ return p.value_predicate(v);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<covered_by<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(covered_by<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::covered_by(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<disjoint<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(disjoint<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::disjoint(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<intersects<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(intersects<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::intersects(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<overlaps<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(overlaps<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::overlaps(i, p.geometry);
+ }
+};
+
+//template <typename Geometry>
+//struct predicate_check<touches<Geometry>, value_tag>
+//{
+// template <typename Value, typename Indexable>
+// static inline bool apply(touches<Geometry> const& p, Value const&, Indexable const& i)
+// {
+// return geometry::touches(i, p.geometry);
+// }
+//};
+
+template <typename Geometry>
+struct predicate_check<within<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(within<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::within(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_covered_by<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(not_covered_by<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return !geometry::covered_by(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_disjoint<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(not_disjoint<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return !geometry::disjoint(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_intersects<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(not_intersects<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return !geometry::intersects(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_overlaps<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(not_overlaps<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return !geometry::overlaps(i, p.geometry);
+ }
+};
+
+//template <typename Geometry>
+//struct predicate_check<not_touches<Geometry>, value_tag>
+//{
+// template <typename Value, typename Indexable>
+// static inline bool apply(not_touches<Geometry> const& p, Value const&, Indexable const& i)
+// {
+// return !geometry::touches(i, p.geometry);
+// }
+//};
+
+template <typename Geometry>
+struct predicate_check<not_within<Geometry>, value_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(not_within<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return !geometry::within(i, p.geometry);
+ }
+};
+
+// ------------------------------------------------------------------ //
+// predicates_chec for envelope
+// ------------------------------------------------------------------ //
+
+template <typename Geometry>
+struct predicate_check<Geometry, envelope_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(Geometry const& g, Value const&, Indexable const& i)
+ {
+ return geometry::intersects(i, g);
+ }
+};
+
+template <>
+struct predicate_check<empty, envelope_tag>
+{
+ template <typename Geometry, typename Value, typename Indexable>
+ static inline bool apply(Geometry const&, Value const&, Indexable const&)
+ {
+ return true;
+ }
+};
+
+template <typename ValuePredicate>
+struct predicate_check<value<ValuePredicate>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(value<ValuePredicate> const&, Value const&, Box const&)
+ {
+ return true;
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<covered_by<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(covered_by<Geometry> const& p, Value const&, Box const& i)
+ {
+ return geometry::intersects(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<disjoint<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(disjoint<Geometry> const& p, Value const&, Box const& i)
+ {
+ return !geometry::covered_by(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<intersects<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(intersects<Geometry> const& p, Value const&, Indexable const& i)
+ {
+ return geometry::intersects(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<overlaps<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static inline bool apply(overlaps<Geometry> const& p, Value const&, Box const& i)
+ {
+ // TODO: awulkiew - possibly change to the version without border case
+ // e.g. intersects_without_border(0,0x1,1, 1,1x2,2) should give false
+ return geometry::intersects(i, p.geometry);
+ }
+};
+
+//template <typename Geometry>
+//struct predicate_check<touches<Geometry>, envelope_tag>
+//{
+// template <typename Value, typename Box>
+// static bool apply(touches<Geometry> const& p, Value const&, Box const& i)
+// {
+// return geometry::intersects(i, p.geometry);
+// }
+//};
+
+template <typename Geometry>
+struct predicate_check<within<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(within<Geometry> const& p, Value const&, Box const& i)
+ {
+ // TODO: awulkiew - possibly change to the version without border case
+ // e.g. intersects_without_border(0,0x1,1, 1,1x2,2) should give false
+ return geometry::intersects(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_covered_by<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(not_covered_by<Geometry> const& p, Value const&, Box const& i)
+ {
+ return !geometry::covered_by(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_disjoint<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(not_disjoint<Geometry> const& p, Value const&, Box const& i)
+ {
+ return !geometry::disjoint(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_intersects<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(not_intersects<Geometry> const& p, Value const&, Box const& i)
+ {
+ return !geometry::covered_by(i, p.geometry);
+ }
+};
+
+template <typename Geometry>
+struct predicate_check<not_overlaps<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(not_overlaps<Geometry> const& p, Value const&, Box const& i)
+ {
+ return true;
+ }
+};
+
+//template <typename Geometry>
+//struct predicate_check<not_touches<Geometry>, envelope_tag>
+//{
+// template <typename Value, typename Box>
+// static bool apply(not_touches<Geometry> const& p, Value const&, Box const& i)
+// {
+// return !geometry::intersects(i, p.geometry);
+// }
+//};
+
+template <typename Geometry>
+struct predicate_check<not_within<Geometry>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static bool apply(not_within<Geometry> const& p, Value const&, Box const& i)
+ {
+ return !geometry::within(i, p.geometry);
+ }
+};
+
+// ------------------------------------------------------------------ //
+// predicates_check
+// ------------------------------------------------------------------ //
+
+template <typename TuplePredicates, typename Tag, unsigned int N>
+struct predicates_check_tuple
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(TuplePredicates const& p, Value const& v, Indexable const& i)
+ {
+ return predicates_check_tuple<TuplePredicates, Tag, N - 1>::apply(p, v, i)
+ && predicate_check<
+ typename boost::tuples::element<N - 1, TuplePredicates>::type,
+ Tag
+ >::apply(boost::get<N - 1>(p), v, i);
+ }
+};
+
+template <typename TuplePredicates, typename Tag>
+struct predicates_check_tuple<TuplePredicates, Tag, 1>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(TuplePredicates const& p, Value const& v, Indexable const& i)
+ {
+ return predicate_check<
+ typename boost::tuples::element<0, TuplePredicates>::type,
+ Tag
+ >::apply(boost::get<0>(p), v, i);
+ }
+};
+
+template <typename Predicate, typename Tag>
+struct predicates_check_impl
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(Predicate const& p, Value const& v, Indexable const& i)
+ {
+ return predicate_check<Predicate, Tag>::apply(p, v, i);
+ }
+};
+
+template <typename Predicate1, typename Predicate2, typename Tag>
+struct predicates_check_impl<std::pair<Predicate1, Predicate2>, Tag>
+{
+ template <typename Value, typename Indexable>
+ static inline bool apply(std::pair<Predicate1, Predicate2> const& p, Value const& v, Indexable const& i)
+ {
+ return predicate_check<Predicate1, Tag>::apply(p.first, v, i)
+ && predicate_check<Predicate2, Tag>::apply(p.second, v, i);
+ }
+};
+
+template <
+ typename T0, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename Tag
+>
+struct predicates_check_impl<
+ boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
+ Tag
+>
+{
+ typedef boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> predicates_type;
+
+ template <typename Value, typename Indexable>
+ static inline bool apply(predicates_type const& p, Value const& v, Indexable const& i)
+ {
+ return predicates_check_tuple<
+ predicates_type,
+ Tag,
+ boost::tuples::length<predicates_type>::value
+ >::apply(p, v, i);
+ }
+};
+
+template <typename Tag, typename Predicates, typename Value, typename Indexable>
+inline bool predicates_check(Predicates const& p, Value const& v, Indexable const& i)
+{
+ return detail::predicates_check_impl<Predicates, Tag>
+ ::apply(p, v, i);
+}
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_PREDICATES_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/pushable_array.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/pushable_array.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,171 @@
+// Boost.Geometry Index
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP
+
+#include <boost/array.hpp>
+
+#include <boost/geometry/extensions/index/detail/assert.hpp>
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+template <typename Element, size_t Capacity>
+class pushable_array
+{
+ typedef typename boost::array<Element, Capacity> array_type;
+
+public:
+ typedef typename array_type::value_type value_type;
+ typedef typename array_type::size_type size_type;
+ typedef typename array_type::iterator iterator;
+ typedef typename array_type::const_iterator const_iterator;
+ typedef typename array_type::reverse_iterator reverse_iterator;
+ typedef typename array_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename array_type::reference reference;
+ typedef typename array_type::const_reference const_reference;
+
+ inline pushable_array()
+ : m_size(0)
+ {}
+
+ inline explicit pushable_array(size_type s)
+ : m_size(s)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
+ }
+
+ inline void resize(size_type s)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
+ 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");
+ return m_array[i];
+ }
+
+ inline Element const& operator[](size_type i) const
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(i < m_size, "index of the element outside the container");
+ return m_array[i];
+ }
+
+ inline Element const& front() const
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
+ return m_array.front();
+ }
+
+ inline Element & front()
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
+ return m_array.front();
+ }
+
+ inline Element const& back() const
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
+ return *(begin() + (m_size - 1));
+ }
+
+ inline Element & back()
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
+ return *(begin() + (m_size - 1));
+ }
+
+ inline iterator begin()
+ {
+ return m_array.begin();
+ }
+
+ inline iterator end()
+ {
+ return m_array.begin() + m_size;
+ }
+
+ inline const_iterator begin() const
+ {
+ return m_array.begin();
+ }
+
+ inline const_iterator end() const
+ {
+ return m_array.begin() + m_size;
+ }
+
+ inline reverse_iterator rbegin()
+ {
+ return reverse_iterator(end());
+ }
+
+ inline reverse_iterator rend()
+ {
+ return reverse_iterator(begin());
+ }
+
+ inline const_reverse_iterator rbegin() const
+ {
+ return const_reverse_iterator(end());
+ }
+
+ inline const_reverse_iterator rend() const
+ {
+ return const_reverse_iterator(begin());
+ }
+
+ inline void clear()
+ {
+ m_size = 0;
+ }
+
+ inline void push_back(Element const& v)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(m_size < Capacity, "can't further increase the size of the container");
+ m_array[m_size] = v;
+ ++m_size;
+ }
+
+ inline void pop_back()
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
+ --m_size;
+ }
+
+ inline bool empty() const
+ {
+ return m_size == 0;
+ }
+
+ inline size_t size() const
+ {
+ return m_size;
+ }
+
+ inline size_t capacity() const
+ {
+ return Capacity;
+ }
+
+private:
+ boost::array<Element, Capacity> m_array;
+ size_type m_size;
+};
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/adaptors.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/adaptors.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,85 @@
+// Boost.Geometry Index
+//
+// R-tree queries range adaptors
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_ADAPTORS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_ADAPTORS_HPP
+
+#include <deque>
+#include <boost/static_assert.hpp>
+
+#include <boost/geometry/extensions/index/adaptors/spatial_query.hpp>
+#include <boost/geometry/extensions/index/adaptors/nearest_query.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+template <typename Value, typename Options, typename Translator, typename Allocator>
+class rtree;
+
+namespace adaptors {
+
+template <typename Value, typename Options, typename Translator, typename Allocator>
+class spatial_query_range< index::rtree<Value, Options, Translator, Allocator> >
+{
+public:
+ typedef std::vector<Value> result_type;
+ typedef typename result_type::iterator iterator;
+ typedef typename result_type::const_iterator const_iterator;
+
+ template <typename Predicates>
+ inline spatial_query_range(
+ index::rtree<Value, Options, Translator, Allocator> const& rtree,
+ Predicates const& pred
+ )
+ {
+ rtree.spatial_query(pred, std::back_inserter(m_result));
+ }
+
+ inline iterator begin() { return m_result.begin(); }
+ inline iterator end() { return m_result.end(); }
+ inline const_iterator begin() const { return m_result.begin(); }
+ inline const_iterator end() const { return m_result.end(); }
+
+private:
+ result_type m_result;
+};
+
+template <typename Value, typename Options, typename Translator, typename Allocator>
+class nearest_query_range< index::rtree<Value, Options, Translator, Allocator> >
+{
+public:
+ typedef std::vector<Value> result_type;
+ typedef typename result_type::iterator iterator;
+ typedef typename result_type::const_iterator const_iterator;
+
+ template <typename DistancesPredicates, typename Predicates>
+ inline nearest_query_range(
+ index::rtree<Value, Options, Translator, Allocator> const& rtree,
+ DistancesPredicates const& dpred,
+ size_t k,
+ Predicates const& pred
+ )
+ {
+ rtree.nearest_query(dpred, k, pred, std::back_inserter(m_result));
+ }
+
+ inline iterator begin() { return m_result.begin(); }
+ inline iterator end() { return m_result.end(); }
+ inline const_iterator begin() const { return m_result.begin(); }
+ inline const_iterator end() const { return m_result.end(); }
+
+private:
+ result_type m_result;
+};
+
+} // namespace adaptors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_ADAPTORS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/kmeans.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/kmeans.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,16 @@
+// Boost.Geometry Index
+//
+// R-tree kmeans algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_KMEANS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_KMEANS_HPP
+
+#include <boost/geometry/extensions/index/rtree/kmeans/split.hpp>
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_KMEANS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/split.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/kmeans/split.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,91 @@
+// Boost.Geometry Index
+//
+// R-tree kmeans split algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_SPLIT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_SPLIT_HPP
+
+#include <boost/geometry/extensions/index/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/rtree/visitors/insert.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+namespace kmeans {
+
+// some details
+
+} // namespace kmeans
+
+// split_kmeans_tag
+// OR
+// split_clusters_tag and redistribute_kmeans_tag - then redistribute will probably slightly different interface
+// or some other than "redistribute"
+
+// 1. for this algorithm one probably MUST USE NON-STATIC NODES with node_default_tag
+// or the algorithm must be changed somehow - to not store additional nodes in the current node
+// but return excessive element/elements container instead (possibly pushable_array<1> or std::vector)
+// this would also cause building of smaller trees since +1 element in nodes wouldn't be needed in different redistributing algorithms
+// 2. it is probably possible to add e.g. 2 levels of tree in one insert
+
+// Edge case is that every node split generates M + 1 children, in parent containing M nodes
+// result is 2M + 1 nodes in parent on this level
+// On next level the same, next the same and so on.
+// We have Depth*M+1 nodes in the root
+// The tree may then gain some > 1 levels in one insert
+// split::apply() manages this but special attention is required
+
+// which algorithm should be used to choose current node in traversing while inserting?
+// some of the currently used ones or some using mean values as well?
+
+// TODO
+// 1. Zmienic troche algorytm zeby przekazywal nadmiarowe elementy do split
+// i pobieral ze split nadmiarowe elementy rodzica
+// W zaleznosci od algorytmu w rozny sposob - l/q/r* powinny zwracac np pushable_array<1>
+// wtedy tez is_overerflow (z R* insert?) bedzie nieportrzebne
+// Dla kmeans zapewne std::vector, jednak w wezlach nadal moglaby byc pushable_array
+// 2. Fajnie byloby tez uproscic te wszystkie parametry root,parent,index itd. Mozliwe ze okazalyby sie zbedne
+// 3. Sprawdzyc czasy wykonywania i zajetosc pamieci
+// 4. Pamietac o parametryzacji kontenera z nadmiarowymi elementami
+// PS. Z R* reinsertami moze byc masakra
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class split<Value, Options, Translator, Box, Allocators, split_kmeans_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;
+
+public:
+ template <typename Node>
+ static inline void apply(node* & root_node,
+ size_t & leafs_level,
+ Node & n,
+ internal_node *parent_node,
+ size_t current_child_index,
+ Translator const& tr,
+ Allocators & allocators)
+ {
+
+ }
+};
+
+} // namespace detail
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_KMEANS_SPLIT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/linear.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/linear.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,16 @@
+// Boost.Geometry Index
+//
+// R-tree linear algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_LINEAR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_LINEAR_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp>
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_LINEAR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/linear/redistribute_elements.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,336 @@
+// Boost.Geometry Index
+//
+// R-tree linear split algorithm implementation
+//
+// Copyright (c) 2008 Federico J. Fernandez.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_REDISTRIBUTE_ELEMENTS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_REDISTRIBUTE_ELEMENTS_HPP
+
+#include <boost/type_traits/is_unsigned.hpp>
+
+#include <boost/geometry/extensions/index/algorithms/content.hpp>
+#include <boost/geometry/extensions/index/algorithms/union_content.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+namespace linear {
+
+// TODO: awulkiew - there are loops inside find_greatest_normalized_separation::apply()
+// iteration is done for each DimensionIndex.
+// Separations and seeds for all DimensionIndex(es) could be calculated at once, stored, then the greatest would be choosen.
+
+// TODO: Implement separate version for Points
+
+// What if width calculated inside find_greatest_normalized_separation::apply() is near 0?
+// What epsilon should be taken to calculation and what would be the value of resulting separation?
+
+// from void find_normalized_separations(std::vector<Box> const& boxes, T& separation, unsigned int& first, unsigned int& second) const
+
+template <typename Elements, typename Parameters, typename Translator, size_t DimensionIndex>
+struct find_greatest_normalized_separation
+{
+ typedef typename Elements::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+
+ static inline void apply(Elements const& elements,
+ Parameters const& parameters,
+ Translator const& translator,
+ coordinate_type & separation,
+ size_t & seed1,
+ size_t & seed2)
+ {
+ const size_t elements_count = parameters.get_max_elements() + 1;
+ BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "unexpected number of elements");
+ 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], 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], translator));
+ coordinate_type max_coord = index::get<max_corner, DimensionIndex>(rtree::element_indexable(elements[i], translator));
+
+ if ( max_coord < lowest_high )
+ {
+ lowest_high = max_coord;
+ lowest_high_index = i;
+ }
+
+ if ( min_coord < lowest_low )
+ lowest_low = min_coord;
+
+ if ( highest_high < max_coord )
+ highest_high = max_coord;
+ }
+
+ // 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], 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], translator));
+ if ( highest_low < min_coord &&
+ i != lowest_high_index )
+ {
+ highest_low = min_coord;
+ highest_low_index = i;
+ }
+ }
+
+ coordinate_type const width = highest_high - lowest_low;
+
+ // TODO: awulkiew - following separation calculation has two flaws:
+ // 1. for floating point numbers width should be compared witn some EPS
+ // 2. separation calculation won't work for unsigned numbers
+ // but there should be possible to calculate negative value (cast to some floating point type?)
+
+ // Temporary workaround
+ BOOST_STATIC_ASSERT(!boost::is_unsigned<coordinate_type>::value);
+
+ if ( width == 0 )
+ separation = 0;
+ // (highest_low - lowest_high) == 0
+ else
+ separation = (highest_low - lowest_high) / width;
+
+ seed1 = highest_low_index;
+ seed2 = lowest_high_index;
+ }
+};
+
+template <typename Elements, typename Parameters, typename Translator, size_t Dimension>
+struct pick_seeds_impl
+{
+ BOOST_STATIC_ASSERT(0 < Dimension);
+
+ typedef typename Elements::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ 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, parameters, tr, separation, seed1, seed2);
+
+ coordinate_type current_separation;
+ size_t 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 )
+ {
+ separation = current_separation;
+ seed1 = s1;
+ seed2 = s2;
+ }
+ }
+};
+
+template <typename Elements, typename Parameters, typename Translator>
+struct pick_seeds_impl<Elements, Parameters, Translator, 1>
+{
+ typedef typename Elements::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ 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, parameters, tr, separation, seed1, seed2);
+ }
+};
+
+// from void linear_pick_seeds(node_pointer const& n, unsigned int &seed1, unsigned int &seed2) const
+
+template <typename Elements, typename Parameters, typename Translator>
+struct pick_seeds
+{
+ typedef typename Elements::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+
+ 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, parameters, tr, separation, seed1, seed2);
+ }
+};
+
+} // namespace linear
+
+// from void split_node(node_pointer const& n, node_pointer& n1, node_pointer& n2) const
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct redistribute_elements<Value, Options, Translator, Box, Allocators, linear_tag>
+{
+ 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,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ {
+ typedef typename rtree::elements_type<Node>::type elements_type;
+ typedef typename elements_type::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ elements_type & elements1 = rtree::elements(n);
+ elements_type & elements2 = rtree::elements(second_node);
+ const size_t elements1_count = parameters.get_max_elements() + 1;
+
+ BOOST_GEOMETRY_INDEX_ASSERT(elements1.size() == elements1_count, "unexpected number of elements");
+
+ // copy original elements
+ elements_type elements_copy(elements1); // MAY THROW, STRONG (alloc, copy)
+
+ // calculate initial seeds
+ size_t seed1 = 0;
+ size_t seed2 = 0;
+ linear::pick_seeds<
+ elements_type,
+ parameters_type,
+ Translator
+ >::apply(elements_copy, parameters, translator, seed1, seed2);
+
+ // prepare nodes' elements containers
+ elements1.clear();
+ BOOST_GEOMETRY_INDEX_ASSERT(elements2.empty(), "unexpected container state");
+
+ try
+ {
+ // add seeds
+ elements1.push_back(elements_copy[seed1]); // MAY THROW, STRONG (copy)
+ elements2.push_back(elements_copy[seed2]); // MAY THROW, STRONG (alloc, copy)
+
+ // calculate boxes
+ 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_GEOMETRY_INDEX_ASSERT(2 <= elements1_count, "unexpected elements number");
+ size_t remaining = elements1_count - 2;
+
+ // redistribute the rest of the elements
+ for ( size_t i = 0 ; i < elements1_count ; ++i )
+ {
+ if (i != seed1 && i != seed2)
+ {
+ element_type const& elem = elements_copy[i];
+ 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.get_min_elements() )
+ {
+ elements1.push_back(elem); // MAY THROW, STRONG (copy)
+ geometry::expand(box1, indexable);
+ content1 = index::content(box1);
+ }
+ else if ( elements2.size() + remaining <= parameters.get_min_elements() )
+ {
+ elements2.push_back(elem); // MAY THROW, STRONG (alloc, copy)
+ geometry::expand(box2, indexable);
+ content2 = index::content(box2);
+ }
+ // choose better node and insert element
+ else
+ {
+ // calculate enlarged boxes and areas
+ Box enlarged_box1(box1);
+ Box enlarged_box2(box2);
+ geometry::expand(enlarged_box1, indexable);
+ geometry::expand(enlarged_box2, indexable);
+ content_type enlarged_content1 = index::content(enlarged_box1);
+ content_type enlarged_content2 = index::content(enlarged_box2);
+
+ content_type content_increase1 = enlarged_content1 - content1;
+ content_type content_increase2 = enlarged_content2 - content2;
+
+ // choose group which box content have to be enlarged least or has smaller content or has fewer elements
+ if ( content_increase1 < content_increase2 ||
+ ( content_increase1 == content_increase2 && content1 < content2 ) ||
+ ( content1 == content2 && elements1.size() <= elements2.size() ) )
+ {
+ elements1.push_back(elem); // MAY THROW, STRONG (copy)
+ box1 = enlarged_box1;
+ content1 = enlarged_content1;
+ }
+ else
+ {
+ elements2.push_back(elem); // MAY THROW, STRONG (alloc, copy)
+ box2 = enlarged_box2;
+ content2 = enlarged_content2;
+ }
+ }
+
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < remaining, "unexpected value");
+ --remaining;
+ }
+ }
+ }
+ catch (...)
+ {
+ elements1.clear();
+ elements2.clear();
+
+ rtree::destroy_elements<Value, Options, Translator, Box, Allocators>::apply(elements_copy, allocators);
+ //elements_copy.clear();
+
+ throw; // RETHROW, BASIC
+ }
+ }
+};
+
+} // namespace detail
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_LINEAR_REDISTRIBUTE_ELEMENTS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/concept.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/concept.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,85 @@
+// Boost.Geometry Index
+//
+// R-tree node concept
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (node));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct internal_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (internal_node));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct leaf
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (leaf));
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, bool IsVisitableConst>
+struct visitor
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (visitor));
+};
+
+template <typename Allocator, typename Value, typename Parameters, typename Box, typename Tag>
+class allocators
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TAG_TYPE,
+ (allocators));
+};
+
+template <typename Allocators, typename Node>
+struct create_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
+ (create_node));
+};
+
+template <typename Allocators, typename Node>
+struct destroy_node
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_NODE_TYPE,
+ (destroy_node));
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_CONCEPT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,95 @@
+// Boost.Geometry Index
+//
+// R-tree nodes dynamic visitor and nodes base type
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_DYNAMIC_VISITOR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_DYNAMIC_VISITOR_HPP
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// visitor forward declaration
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, bool IsVisitableConst>
+struct dynamic_visitor;
+
+// node
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct dynamic_node
+{
+ virtual ~dynamic_node() {}
+ virtual void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, Tag, false> &) = 0;
+ virtual void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, Tag, true> &) const = 0;
+};
+
+// nodes variants forward declarations
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct dynamic_internal_node;
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct dynamic_leaf;
+
+// visitor
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct dynamic_visitor<Value, Parameters, Box, Allocators, Tag, true>
+{
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, Tag> internal_node;
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, Tag> leaf;
+
+ virtual ~dynamic_visitor() {}
+
+ virtual void operator()(internal_node const&) = 0;
+ virtual void operator()(leaf const&) = 0;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct dynamic_visitor<Value, Parameters, Box, Allocators, Tag, false>
+{
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, Tag> internal_node;
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, Tag> leaf;
+
+ virtual ~dynamic_visitor() {}
+
+ virtual void operator()(internal_node &) = 0;
+ virtual void operator()(leaf &) = 0;
+};
+
+// nodes conversion
+
+template <typename Derived, typename Parameters, typename Value, typename Box, typename Allocators, typename Tag>
+inline Derived & get(dynamic_node<Value, Parameters, Box, Allocators, Tag> & n)
+{
+ BOOST_GEOMETRY_INDEX_ASSERT(dynamic_cast<Derived*>(&n), "can't cast to a Derived type");
+ return static_cast<Derived&>(n);
+}
+
+template <typename Derived, typename Parameters, typename Value, typename Box, typename Allocators, typename Tag>
+inline Derived * get(dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+{
+ BOOST_GEOMETRY_INDEX_ASSERT(dynamic_cast<Derived*>(n), "can't cast to a Derived type");
+ return static_cast<Derived*>(n);
+}
+
+// apply visitor
+
+template <typename Visitor, typename Visitable>
+inline void apply_visitor(Visitor & v, Visitable & n)
+{
+ BOOST_GEOMETRY_INDEX_ASSERT(&n, "null ptr");
+ n.apply_visitor(v);
+}
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_DYNAMIC_VISITOR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,162 @@
+// Boost.Geometry Index
+//
+// R-tree nodes
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/concept.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node_d_mem_dynamic.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/node/node_d_mem_static.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node_s_mem_dynamic.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/node/node_s_mem_static.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node_auto_ptr.hpp>
+
+#include <boost/geometry/algorithms/expand.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// elements box
+
+template <typename Box, typename FwdIter, typename Translator>
+inline Box elements_box(FwdIter first, FwdIter last, Translator const& tr)
+{
+ BOOST_GEOMETRY_INDEX_ASSERT(first != last, "Can't calculate element's box");
+
+ Box result;
+
+ geometry::convert(element_indexable(*first, tr), result);
+ ++first;
+
+ for ( ; first != last ; ++first )
+ geometry::expand(result, element_indexable(*first, tr));
+
+ return result;
+}
+
+// destroys subtree if the element is internal node's element
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct destroy_element
+{
+ typedef typename Options::parameters_type parameters_type;
+
+ 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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+ inline static void apply(typename internal_node::elements_type::value_type & element, Allocators & allocators)
+ {
+ node_auto_ptr dummy(element.second, allocators);
+ element.second = 0;
+ }
+
+ inline static void apply(typename leaf::elements_type::value_type &, Allocators &) {}
+};
+
+// destroys stored subtrees if internal node's elements are passed
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct destroy_elements
+{
+ typedef typename Options::parameters_type parameters_type;
+
+ 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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+ inline static void apply(typename internal_node::elements_type & elements, Allocators & allocators)
+ {
+ for ( size_t i = 0 ; i < elements.size() ; ++i )
+ {
+ node_auto_ptr dummy(elements[i].second, allocators);
+ elements[i].second = 0;
+ }
+ }
+
+ inline static void apply(typename leaf::elements_type &, Allocators &)
+ {}
+
+ inline static void apply(typename internal_node::elements_type::iterator first,
+ typename internal_node::elements_type::iterator last,
+ Allocators & allocators)
+ {
+ for ( ; first != last ; ++first )
+ {
+ node_auto_ptr dummy(first->second, allocators);
+ first->second = 0;
+ }
+ }
+
+ inline static void apply(typename leaf::elements_type::iterator /*first*/,
+ typename leaf::elements_type::iterator /*last*/,
+ Allocators & /*allocators*/)
+ {}
+};
+
+// clears node, deletes all subtrees stored in node
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct clear_node
+{
+ 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 static void apply(node & node, Allocators & allocators)
+ {
+ rtree::visitors::is_leaf<Value, Options, Box, Allocators> ilv;
+ rtree::apply_visitor(ilv, node);
+ if ( ilv.result )
+ {
+ apply(rtree::get<leaf>(node), allocators);
+ }
+ else
+ {
+ apply(rtree::get<internal_node>(node), allocators);
+ }
+ }
+
+ inline static void apply(internal_node & internal_node, Allocators & allocators)
+ {
+ destroy_elements<Value, Options, Translator, Box, Allocators>::apply(rtree::elements(internal_node), allocators);
+ rtree::elements(internal_node).clear();
+ }
+
+ inline static void apply(leaf & leaf, Allocators &)
+ {
+ rtree::elements(leaf).clear();
+ }
+};
+
+template <typename Container, typename Iterator>
+void copy_from_back(Container & container, Iterator it)
+{
+ BOOST_GEOMETRY_INDEX_ASSERT(!container.empty(), "cannot copy from empty container");
+ Iterator back_it = container.end();
+ --back_it;
+ if ( it != back_it )
+ {
+ *it = *back_it; // MAY THROW (copy)
+ }
+}
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_auto_ptr.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_auto_ptr.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,78 @@
+// Boost.Geometry Index
+//
+// R-tree node auto ptr
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_AUTO_PTR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_AUTO_PTR_HPP
+
+#include <boost/noncopyable.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/visitors/destroy.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class node_auto_ptr
+ : boost::noncopyable
+{
+ typedef typename rtree::node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type node;
+
+public:
+ node_auto_ptr(node * ptr, Allocators & allocators)
+ : m_ptr(ptr)
+ , m_allocators(allocators)
+ {}
+
+ ~node_auto_ptr()
+ {
+ reset();
+ }
+
+ void reset(node * ptr = 0)
+ {
+ if ( m_ptr )
+ {
+ detail::rtree::visitors::destroy<Value, Options, Translator, Box, Allocators> del_v(m_ptr, m_allocators);
+ detail::rtree::apply_visitor(del_v, *m_ptr);
+ }
+ m_ptr = ptr;
+ }
+
+ void release()
+ {
+ m_ptr = 0;
+ }
+
+ node * get() const
+ {
+ return m_ptr;
+ }
+
+ node & operator*() const
+ {
+ return *m_ptr;
+ }
+
+ node * operator->() const
+ {
+ return m_ptr;
+ }
+
+private:
+ node * m_ptr;
+ Allocators & m_allocators;
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_AUTO_PTR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_dynamic.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_dynamic.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,339 @@
+// Boost.Geometry Index
+//
+// R-tree nodes based on run-time polymorphism, storing std::vectors
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_HPP
+
+#include <vector>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+{
+ typedef std::vector<
+ std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> *>,
+ typename Allocators::internal_node_elements_allocator_type
+ > elements_type;
+
+ inline dynamic_internal_node(typename Allocators::internal_node_elements_allocator_type & al)
+ : elements(al)
+ {}
+
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, true> & v) const { v(*this); }
+
+ elements_type elements;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+{
+ typedef std::vector<
+ Value,
+ typename Allocators::leaf_elements_allocator_type
+ > elements_type;
+
+ inline dynamic_leaf(typename Allocators::leaf_elements_allocator_type & al)
+ : elements(al)
+ {}
+
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, true> & v) const { v(*this); }
+
+ elements_type elements;
+};
+
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+{
+ typedef dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+{
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag>
+{
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag> type;
+};
+
+// visitor traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, IsVisitableConst>
+{
+ typedef dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_dynamic_tag, IsVisitableConst> type;
+};
+
+// element's indexable type
+
+template <typename Value, typename Translator>
+struct element_indexable_type
+{
+ typedef typename translator::indexable_type<Translator>::type type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
+struct element_indexable_type<
+ std::pair<Box, dynamic_node<Value, Parameters, Box, Allocators, Tag> *>,
+ Translator
+>
+{
+ typedef Box type;
+};
+
+// element's indexable getter
+
+template <typename Value, typename Translator>
+inline typename Translator::result_type
+element_indexable(Value const& el, Translator const& tr)
+{
+ return tr(el);
+}
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
+inline Box const&
+element_indexable(
+ std::pair< Box, dynamic_node<Value, Parameters, Box, Allocators, Tag> *> const& el,
+ Translator const&)
+{
+ return el.first;
+}
+
+// nodes elements
+
+template <typename Node>
+struct elements_type
+{
+ typedef typename Node::elements_type type;
+};
+
+template <typename Node>
+inline typename elements_type<Node>::type &
+elements(Node & n)
+{
+ return n.elements;
+}
+
+template <typename Node>
+inline typename elements_type<Node>::type const&
+elements(Node const& n)
+{
+ 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>
+class allocators<Allocator, Value, Parameters, Box, node_d_mem_dynamic_tag>
+ : nonassignable
+{
+ BOOST_COPYABLE_AND_MOVABLE_ALT(allocators)
+
+public:
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+
+ typedef typename allocator_type::template rebind<
+ typename internal_node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
+ >::other internal_node_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ typename leaf<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type
+ >::other leaf_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ std::pair<Box, typename node<Value, Parameters, Box, allocators, node_d_mem_dynamic_tag>::type *>
+ >::other internal_node_elements_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ Value
+ >::other leaf_elements_allocator_type;
+
+ inline allocators()
+ : allocator()
+ , internal_node_allocator()
+ , leaf_allocator()
+ , internal_node_elements_allocator()
+ , leaf_elements_allocator()
+ {}
+
+ inline explicit allocators(Allocator alloc)
+ : allocator(alloc)
+ , internal_node_allocator(allocator)
+ , leaf_allocator(allocator)
+ , internal_node_elements_allocator(allocator)
+ , leaf_elements_allocator(allocator)
+ {}
+
+ inline allocators(allocators const& a)
+ : allocator(a.allocator)
+ , internal_node_allocator(a.internal_node_allocator)
+ , leaf_allocator(a.leaf_allocator)
+ , internal_node_elements_allocator(a.internal_node_elements_allocator)
+ , leaf_elements_allocator(a.leaf_elements_allocator)
+ {}
+
+ inline allocators(BOOST_RV_REF(allocators) a)
+ : allocator(boost::move(a.allocator))
+ , internal_node_allocator(boost::move(a.internal_node_allocator))
+ , leaf_allocator(boost::move(a.leaf_allocator))
+ , internal_node_elements_allocator(boost::move(a.internal_node_elements_allocator))
+ , leaf_elements_allocator(boost::move(a.leaf_elements_allocator))
+ {}
+
+ void swap(allocators & a)
+ {
+ boost::swap(allocator, a.allocator);
+ boost::swap(internal_node_allocator, a.internal_node_allocator);
+ boost::swap(leaf_allocator, a.leaf_allocator);
+ boost::swap(internal_node_elements_allocator, a.internal_node_elements_allocator);
+ boost::swap(leaf_elements_allocator, a.leaf_elements_allocator);
+ }
+
+ allocator_type allocator;
+ internal_node_allocator_type internal_node_allocator;
+ leaf_allocator_type leaf_allocator;
+ internal_node_elements_allocator_type internal_node_elements_allocator;
+ leaf_elements_allocator_type leaf_elements_allocator;
+};
+
+// create_node_impl
+
+template <typename BaseNode, typename Node>
+struct create_dynamic_node
+{
+ template <typename AllocNode, typename AllocElems>
+ static inline BaseNode * apply(AllocNode & alloc_node, AllocElems & alloc_elems)
+ {
+ Node * p = alloc_node.allocate(1);
+
+ if ( 0 == p )
+ throw std::bad_alloc();
+
+ try
+ {
+ // NOTE/TODO
+ // Here the whole node may be copied
+ alloc_node.construct(p, Node(alloc_elems));
+ }
+ catch(...)
+ {
+ alloc_node.deallocate(p, 1);
+ throw;
+ }
+
+ return p;
+ }
+};
+
+// destroy_node_impl
+
+template <typename Node>
+struct destroy_dynamic_node
+{
+ template <typename AllocNode, typename BaseNode>
+ static inline void apply(AllocNode & alloc_node, BaseNode * n)
+ {
+ Node * p = rtree::get<Node>(n);
+ alloc_node.destroy(p);
+ alloc_node.deallocate(p, 1);
+ }
+};
+
+// create_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct create_node<
+ Allocators,
+ dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline dynamic_node<Value, Parameters, Box, Allocators, Tag> *
+ apply(Allocators & allocators)
+ {
+ return create_dynamic_node<
+ dynamic_node<Value, Parameters, Box, Allocators, Tag>,
+ dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
+ >::apply(allocators.internal_node_allocator, allocators.internal_node_elements_allocator);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct create_node<
+ Allocators,
+ dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline dynamic_node<Value, Parameters, Box, Allocators, Tag> *
+ apply(Allocators & allocators)
+ {
+ return create_dynamic_node<
+ dynamic_node<Value, Parameters, Box, Allocators, Tag>,
+ dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
+ >::template apply(allocators.leaf_allocator, allocators.leaf_elements_allocator);
+ }
+};
+
+// destroy_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct destroy_node<
+ Allocators,
+ dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline void apply(Allocators & allocators, dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+ {
+ destroy_dynamic_node<
+ dynamic_internal_node<Value, Parameters, Box, Allocators, Tag>
+ >::apply(allocators.internal_node_allocator, n);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct destroy_node<
+ Allocators,
+ dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline void apply(Allocators & allocators, dynamic_node<Value, Parameters, Box, Allocators, Tag> * n)
+ {
+ destroy_dynamic_node<
+ dynamic_leaf<Value, Parameters, Box, Allocators, Tag>
+ >::apply(allocators.leaf_allocator, n);
+ }
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_static.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_d_mem_static.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,184 @@
+// Boost.Geometry Index
+//
+// R-tree nodes based on runtime-polymorphism, storing static-size containers
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp>
+#include <boost/geometry/extensions/index/detail/static_vector.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef detail::static_vector<
+ std::pair<
+ Box,
+ dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> *
+ >,
+ Parameters::max_elements + 1
+ > elements_type;
+
+ template <typename Dummy>
+ inline dynamic_internal_node(Dummy) {}
+
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, true> & v) const { v(*this); }
+
+ elements_type elements;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ : public dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef detail::static_vector<Value, Parameters::max_elements + 1> elements_type;
+
+ template <typename Dummy>
+ inline dynamic_leaf(Dummy) {}
+
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, false> & v) { v(*this); }
+ void apply_visitor(dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, true> & v) const { v(*this); }
+
+ elements_type elements;
+};
+
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+{
+ typedef dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, IsVisitableConst>
+{
+ typedef dynamic_visitor<Value, Parameters, Box, Allocators, node_d_mem_static_tag, IsVisitableConst> type;
+};
+
+// elements derived type
+template <typename OldValue, size_t N, typename NewValue>
+struct container_from_elements_type<detail::static_vector<OldValue, N>, NewValue>
+{
+ typedef detail::static_vector<NewValue, N> type;
+};
+
+// allocators
+
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+class allocators<Allocator, Value, Parameters, Box, node_d_mem_static_tag>
+ : detail::nonassignable
+{
+ BOOST_COPYABLE_AND_MOVABLE_ALT(allocators)
+
+public:
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+
+ typedef typename allocator_type::template rebind<
+ typename internal_node<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
+ >::other internal_node_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ typename leaf<Value, Parameters, Box, allocators, node_d_mem_static_tag>::type
+ >::other leaf_allocator_type;
+
+ inline allocators()
+ : allocator()
+ , internal_node_allocator()
+ , leaf_allocator()
+ {}
+
+ inline explicit allocators(Allocator alloc)
+ : allocator(alloc)
+ , internal_node_allocator(allocator)
+ , leaf_allocator(allocator)
+ {}
+
+ inline allocators(allocators const& a)
+ : allocator(a.allocator)
+ , internal_node_allocator(a.internal_node_allocator)
+ , leaf_allocator(a.leaf_allocator)
+ {}
+
+ inline allocators(BOOST_RV_REF(allocators) a)
+ : allocator(boost::move(a.allocator))
+ , internal_node_allocator(boost::move(a.internal_node_allocator))
+ , leaf_allocator(boost::move(a.leaf_allocator))
+ {}
+
+ void swap(allocators & a)
+ {
+ boost::swap(allocator, a.allocator);
+ boost::swap(internal_node_allocator, a.internal_node_allocator);
+ boost::swap(leaf_allocator, a.leaf_allocator);
+ }
+
+ allocator_type allocator;
+ internal_node_allocator_type internal_node_allocator;
+ leaf_allocator_type leaf_allocator;
+};
+
+// create_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+>
+{
+ static inline dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag> *
+ apply(Allocators & allocators)
+ {
+ return create_dynamic_node<
+ dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>,
+ dynamic_internal_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ >::template apply(allocators.internal_node_allocator, allocators.internal_node_allocator);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+>
+{
+ static inline typename node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>::type *
+ apply(Allocators & allocators)
+ {
+ return create_dynamic_node<
+ dynamic_node<Value, Parameters, Box, Allocators, node_d_mem_static_tag>,
+ dynamic_leaf<Value, Parameters, Box, Allocators, node_d_mem_static_tag>
+ >::template apply(allocators.leaf_allocator, allocators.leaf_allocator);
+ }
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_dynamic.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_dynamic.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,297 @@
+// Boost.Geometry Index
+//
+// R-tree nodes based on Boost.Variant, storing std::vectors
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_VARIANT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_VARIANT_HPP
+
+#include <vector>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/static_visitor.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// nodes default types
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct static_internal_node
+{
+ typedef std::vector<
+ std::pair<
+ Box,
+ typename node<Value, Parameters, Box, Allocators, Tag>::type *
+ >,
+ typename Allocators::internal_node_elements_allocator_type
+ > elements_type;
+
+ inline static_internal_node(typename Allocators::internal_node_elements_allocator_type & al)
+ : elements(al)
+ {}
+
+ elements_type elements;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct static_leaf
+{
+ typedef std::vector<
+ Value,
+ typename Allocators::leaf_elements_allocator_type
+ > elements_type;
+
+ inline static_leaf(typename Allocators::leaf_elements_allocator_type & al)
+ : elements(al)
+ {}
+
+ elements_type elements;
+};
+
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
+{
+ typedef boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
+ > type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
+{
+ typedef static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag>
+{
+ typedef static_leaf<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag> type;
+};
+
+// visitor traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_s_mem_dynamic_tag, IsVisitableConst>
+{
+ typedef static_visitor<> type;
+};
+
+// element's indexable type
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
+struct element_indexable_type<
+ std::pair<
+ Box,
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > *
+ >,
+ Translator
+>
+{
+ typedef Box type;
+};
+
+// element's indexable getter
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag, typename Translator>
+inline Box const&
+element_indexable(std::pair<
+ Box,
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > *
+ > const& el,
+ Translator const&)
+{
+ return el.first;
+}
+
+// allocators
+
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+class allocators<Allocator, Value, Parameters, Box, node_s_mem_dynamic_tag>
+ : nonassignable
+{
+ BOOST_COPYABLE_AND_MOVABLE_ALT(allocators)
+
+public:
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+
+ typedef typename allocator_type::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_s_mem_dynamic_tag>::type
+ >::other node_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ std::pair<Box, typename node<Value, Parameters, Box, allocators, node_s_mem_dynamic_tag>::type *>
+ >::other internal_node_elements_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ Value
+ >::other leaf_elements_allocator_type;
+
+ inline allocators()
+ : allocator()
+ , node_allocator()
+ , internal_node_elements_allocator()
+ , leaf_elements_allocator()
+ {}
+
+ inline explicit allocators(Allocator alloc)
+ : allocator(alloc)
+ , node_allocator(allocator)
+ , internal_node_elements_allocator(allocator)
+ , leaf_elements_allocator(allocator)
+ {}
+
+ inline allocators(allocators const& a)
+ : allocator(a.allocator)
+ , node_allocator(a.node_allocator)
+ , internal_node_elements_allocator(a.internal_node_elements_allocator)
+ , leaf_elements_allocator(a.leaf_elements_allocator)
+ {}
+
+ inline allocators(BOOST_RV_REF(allocators) a)
+ : allocator(boost::move(a.allocator))
+ , node_allocator(boost::move(a.node_allocator))
+ , internal_node_elements_allocator(boost::move(a.internal_node_elements_allocator))
+ , leaf_elements_allocator(boost::move(a.leaf_elements_allocator))
+ {}
+
+ void swap(allocators & a)
+ {
+ boost::swap(allocator, a.allocator);
+ boost::swap(node_allocator, a.node_allocator);
+ boost::swap(internal_node_elements_allocator, a.internal_node_elements_allocator);
+ boost::swap(leaf_elements_allocator, a.leaf_elements_allocator);
+ }
+
+ allocator_type allocator;
+ node_allocator_type node_allocator;
+ internal_node_elements_allocator_type internal_node_elements_allocator;
+ leaf_elements_allocator_type leaf_elements_allocator;
+};
+
+// create_node_variant
+
+template <typename Variant, typename Node>
+struct create_static_node
+{
+ template <typename AllocNode, typename AllocElems>
+ static inline Variant * apply(AllocNode & alloc_node, AllocElems & alloc_elems)
+ {
+ Variant * p = alloc_node.allocate(1);
+
+ if ( 0 == p )
+ throw std::bad_alloc();
+
+ try
+ {
+ // NOTE/TODO
+ // Here the whole node may be copied
+ alloc_node.construct(p, Node(alloc_elems)); // implicit cast to Variant
+ }
+ catch(...)
+ {
+ alloc_node.deallocate(p, 1);
+ throw;
+ }
+
+ return p;
+ }
+};
+
+// destroy_node_variant
+
+template <typename Node>
+struct destroy_static_node
+{
+ template <typename AllocNode, typename Variant>
+ static inline void apply(AllocNode & alloc_node, Variant * n)
+ {
+ alloc_node.destroy(n);
+ alloc_node.deallocate(n, 1);
+ }
+};
+
+// create_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct create_node<
+ Allocators,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline typename node<Value, Parameters, Box, Allocators, Tag>::type *
+ apply(Allocators & allocators)
+ {
+ return create_static_node<
+ typename node<Value, Parameters, Box, Allocators, Tag>::type,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ >::template apply(allocators.node_allocator, allocators.internal_node_elements_allocator);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct create_node<
+ Allocators,
+ static_leaf<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline typename node<Value, Parameters, Box, Allocators, Tag>::type *
+ apply(Allocators & allocators)
+ {
+ return create_static_node<
+ typename node<Value, Parameters, Box, Allocators, Tag>::type,
+ static_leaf<Value, Parameters, Box, Allocators, Tag>
+ >::template apply(allocators.node_allocator, allocators.leaf_elements_allocator);
+ }
+};
+
+// destroy_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct destroy_node<
+ Allocators,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline void apply(Allocators & allocators, typename node<Value, Parameters, Box, Allocators, Tag>::type * n)
+ {
+ destroy_static_node<
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ >::apply(allocators.node_allocator, n);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box, typename Tag>
+struct destroy_node<
+ Allocators,
+ static_leaf<Value, Parameters, Box, Allocators, Tag>
+>
+{
+ static inline void apply(Allocators & allocators, typename node<Value, Parameters, Box, Allocators, Tag>::type * n)
+ {
+ destroy_static_node<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>
+ >::apply(allocators.node_allocator, n);
+ }
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_VARIANT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_static.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/node_s_mem_static.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,175 @@
+// Boost.Geometry Index
+//
+// R-tree nodes based on Boost.Variant, storing static-size containers
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_VARIANT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_VARIANT_HPP
+
+#include <boost/geometry/extensions/index/detail/static_vector.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/static_visitor.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// nodes default types
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+{
+ typedef detail::static_vector<
+ std::pair<
+ Box,
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
+ >,
+ Parameters::max_elements + 1
+ > elements_type;
+
+ template <typename Dummy>
+ inline static_internal_node(Dummy) {}
+
+ elements_type elements;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct static_leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+{
+ typedef detail::static_vector<Value, Parameters::max_elements + 1> elements_type;
+
+ template <typename Dummy>
+ inline static_leaf(Dummy) {}
+
+ elements_type elements;
+};
+
+// nodes traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+{
+ typedef boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+ > type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+{
+ typedef static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag> type;
+};
+
+template <typename Value, typename Parameters, typename Box, typename Allocators>
+struct leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+{
+ typedef static_leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag> type;
+};
+
+// visitor traits
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, bool IsVisitableConst>
+struct visitor<Value, Parameters, Box, Allocators, node_s_mem_static_tag, IsVisitableConst>
+{
+ typedef static_visitor<> type;
+};
+
+// allocators
+
+template <typename Allocator, typename Value, typename Parameters, typename Box>
+struct allocators<Allocator, Value, Parameters, Box, node_s_mem_static_tag>
+ : nonassignable
+{
+ BOOST_COPYABLE_AND_MOVABLE_ALT(allocators)
+
+public:
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+
+ typedef typename allocator_type::template rebind<
+ typename node<Value, Parameters, Box, allocators, node_s_mem_static_tag>::type
+ >::other node_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ std::pair<Box, typename node<Value, Parameters, Box, allocators, node_s_mem_static_tag>::type *>
+ >::other internal_node_elements_allocator_type;
+
+ typedef typename allocator_type::template rebind<
+ Value
+ >::other leaf_elements_allocator_type;
+
+ inline allocators()
+ : allocator()
+ , node_allocator()
+ {}
+
+ inline explicit allocators(Allocator alloc)
+ : allocator(alloc)
+ , node_allocator(allocator)
+ {}
+
+ inline allocators(allocators const& a)
+ : allocator(a.allocator)
+ , node_allocator(a.node_allocator)
+ {}
+
+ inline allocators(BOOST_RV_REF(allocators) a)
+ : allocator(boost::move(a.allocator))
+ , node_allocator(boost::move(a.node_allocator))
+ {}
+
+ void swap(allocators & a)
+ {
+ boost::swap(allocator, a.allocator);
+ boost::swap(node_allocator, a.node_allocator);
+ }
+
+ allocator_type allocator;
+ node_allocator_type node_allocator;
+};
+
+// create_node
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+>
+{
+ static inline typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
+ apply(Allocators & allocators)
+ {
+ return create_static_node<
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type,
+ static_internal_node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+ >::template apply(allocators.node_allocator, allocators.node_allocator);
+ }
+};
+
+template <typename Allocators, typename Value, typename Parameters, typename Box>
+struct create_node<
+ Allocators,
+ static_leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+>
+{
+ static inline typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type *
+ apply(Allocators & allocators)
+ {
+ return create_static_node<
+ typename node<Value, Parameters, Box, Allocators, node_s_mem_static_tag>::type,
+ static_leaf<Value, Parameters, Box, Allocators, node_s_mem_static_tag>
+ >::template apply(allocators.node_allocator, allocators.node_allocator);
+ }
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_NODE_DEFAULT_STATIC_VARIANT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/static_visitor.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/node/static_visitor.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,76 @@
+// Boost.Geometry Index
+//
+// R-tree nodes static visitor related code
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_STATIC_VISITOR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_STATIC_VISITOR_HPP
+
+#include <boost/variant.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// nodes variants forward declarations
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct static_internal_node;
+
+template <typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+struct static_leaf;
+
+// nodes conversion
+
+template <typename V, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+inline V & get(
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > & v)
+{
+ return boost::get<V>(v);
+}
+
+template <typename V, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+inline V * get(
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > *v)
+{
+ return boost::get<V>(v);
+}
+
+// apply visitor
+
+template <typename Visitor, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+inline void apply_visitor(Visitor & v,
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > & n)
+{
+ boost::apply_visitor(v, n);
+}
+
+template <typename Visitor, typename Value, typename Parameters, typename Box, typename Allocators, typename Tag>
+inline void apply_visitor(Visitor & v,
+ boost::variant<
+ static_leaf<Value, Parameters, Box, Allocators, Tag>,
+ static_internal_node<Value, Parameters, Box, Allocators, Tag>
+ > const& n)
+{
+ boost::apply_visitor(v, n);
+}
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_NODE_STATIC_VISITOR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/options.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/options.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,155 @@
+// Boost.Geometry Index
+//
+// R-tree options, algorithms, parameters
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_OPTIONS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_OPTIONS_HPP
+
+#include <boost/geometry/extensions/index/parameters.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree {
+
+// InsertTag
+struct insert_default_tag {};
+struct insert_reinsert_tag {};
+
+// ChooseNextNodeTag
+struct choose_by_content_diff_tag {};
+struct choose_by_overlap_diff_tag {};
+
+// SplitTag
+struct split_default_tag {};
+//struct split_kmeans_tag {};
+
+// RedistributeTag
+struct linear_tag {};
+struct quadratic_tag {};
+struct rstar_tag {};
+
+// NodeTag
+struct node_d_mem_dynamic_tag {};
+struct node_d_mem_static_tag {};
+struct node_s_mem_dynamic_tag {};
+struct node_s_mem_static_tag {};
+
+template <typename Parameters, typename InsertTag, typename ChooseNextNodeTag, typename SplitTag, typename RedistributeTag, typename NodeTag>
+struct options
+{
+ typedef Parameters parameters_type;
+ typedef InsertTag insert_tag;
+ typedef ChooseNextNodeTag choose_next_node_tag;
+ typedef SplitTag split_tag;
+ typedef RedistributeTag redistribute_tag;
+ typedef NodeTag node_tag;
+};
+
+template <typename Parameters>
+struct options_type
+{
+ // TODO: awulkiew - use static assert
+};
+
+template <size_t MaxElements, size_t MinElements>
+struct options_type< linear<MaxElements, MinElements> >
+{
+ typedef options<
+ linear<MaxElements, MinElements>,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ linear_tag,
+ node_d_mem_static_tag
+ > type;
+};
+
+template <size_t MaxElements, size_t MinElements>
+struct options_type< quadratic<MaxElements, MinElements> >
+{
+ typedef options<
+ quadratic<MaxElements, MinElements>,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ quadratic_tag,
+ node_d_mem_static_tag
+ > type;
+};
+
+template <size_t MaxElements, size_t MinElements, size_t OverlapCostThreshold, size_t ReinsertedElements>
+struct options_type< rstar<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements> >
+{
+ typedef options<
+ rstar<MaxElements, MinElements, OverlapCostThreshold, ReinsertedElements>,
+ insert_reinsert_tag,
+ choose_by_overlap_diff_tag,
+ split_default_tag,
+ rstar_tag,
+ node_d_mem_static_tag
+ > type;
+};
+
+//template <size_t MaxElements, size_t MinElements>
+//struct options_type< kmeans<MaxElements, MinElements> >
+//{
+// typedef options<
+// kmeans<MaxElements, MinElements>,
+// insert_default_tag,
+// choose_by_content_diff_tag, // change it?
+// split_kmeans_tag,
+// int, // dummy tag - not used for now
+// node_d_mem_static_tag
+// > type;
+//};
+
+template <>
+struct options_type< runtime::linear >
+{
+ typedef options<
+ runtime::linear,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ linear_tag,
+ node_d_mem_dynamic_tag
+ > type;
+};
+
+template <>
+struct options_type< runtime::quadratic >
+{
+ typedef options<
+ runtime::quadratic,
+ insert_default_tag,
+ choose_by_content_diff_tag,
+ split_default_tag,
+ quadratic_tag,
+ node_d_mem_dynamic_tag
+ > type;
+};
+
+template <>
+struct options_type< runtime::rstar >
+{
+ typedef options<
+ runtime::rstar,
+ insert_reinsert_tag,
+ choose_by_overlap_diff_tag,
+ split_default_tag,
+ rstar_tag,
+ node_d_mem_dynamic_tag
+ > type;
+};
+
+}} // namespace detail::rtree
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_OPTIONS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/quadratic.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/quadratic.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,16 @@
+// Boost.Geometry Index
+//
+// R-tree quadratic algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_QUADRATIC_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_QUADRATIC_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp>
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_QUADRATIC_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/quadratic/redistribute_elements.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,296 @@
+// Boost.Geometry Index
+//
+// R-tree quadratic split algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_REDISTRIBUTE_ELEMENTS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_REDISTRIBUTE_ELEMENTS_HPP
+
+#include <algorithm>
+
+#include <boost/geometry/extensions/index/algorithms/content.hpp>
+#include <boost/geometry/extensions/index/algorithms/union_content.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+namespace quadratic {
+
+template <typename Elements, typename Parameters, typename Translator, typename Box>
+struct pick_seeds
+{
+ typedef typename Elements::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+ typedef Box box_type;
+ 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.get_max_elements() + 1;
+ BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "wrong number of elements");
+ BOOST_GEOMETRY_INDEX_ASSERT(2 <= elements_count, "unexpected number of elements");
+
+ content_type greatest_free_content = 0;
+ seed1 = 0;
+ seed2 = 1;
+
+ for ( size_t i = 0 ; i < elements_count - 1 ; ++i )
+ {
+ for ( size_t j = i + 1 ; j < elements_count ; ++j )
+ {
+ indexable_type const& ind1 = rtree::element_indexable(elements[i], tr);
+ indexable_type const& ind2 = rtree::element_indexable(elements[j], tr);
+
+ box_type enlarged_box;
+ geometry::convert(ind1, enlarged_box);
+ geometry::expand(enlarged_box, ind2);
+
+ content_type free_content = (index::content(enlarged_box) - index::content(ind1)) - index::content(ind2);
+
+ if ( greatest_free_content < free_content )
+ {
+ greatest_free_content = free_content;
+ seed1 = i;
+ seed2 = j;
+ }
+ }
+ }
+ }
+};
+
+} // namespace quadratic
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct redistribute_elements<Value, Options, Translator, Box, Allocators, quadratic_tag>
+{
+ 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 index::default_content_result<Box>::type content_type;
+
+ template <typename Node>
+ static inline void apply(Node & n,
+ Node & second_node,
+ Box & box1,
+ Box & box2,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ {
+ typedef typename rtree::elements_type<Node>::type elements_type;
+ typedef typename elements_type::value_type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+ typedef typename index::traits::coordinate_type<indexable_type>::type coordinate_type;
+
+ elements_type & elements1 = rtree::elements(n);
+ elements_type & elements2 = rtree::elements(second_node);
+ 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_type elements_copy(elements1); // MAY THROW, STRONG (alloc, copy)
+ elements_type elements_backup(elements1); // MAY THROW, STRONG (alloc, copy)
+
+ // calculate initial seeds
+ size_t seed1 = 0;
+ size_t seed2 = 0;
+ quadratic::pick_seeds<
+ elements_type,
+ parameters_type,
+ Translator,
+ Box
+ >::apply(elements_copy, parameters, translator, seed1, seed2);
+
+ // prepare nodes' elements containers
+ elements1.clear();
+ BOOST_GEOMETRY_INDEX_ASSERT(elements2.empty(), "second node's elements container should be empty");
+
+ try
+ {
+ // add seeds
+ elements1.push_back(elements_copy[seed1]); // MAY THROW, STRONG (copy)
+ elements2.push_back(elements_copy[seed2]); // MAY THROW, STRONG (alloc, copy)
+
+ // calculate boxes
+ 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)
+ {
+ rtree::copy_from_back(elements_copy, elements_copy.begin() + seed2); // MAY THROW, STRONG (copy)
+ elements_copy.pop_back();
+ rtree::copy_from_back(elements_copy, elements_copy.begin() + seed1); // MAY THROW, STRONG (copy)
+ elements_copy.pop_back();
+ }
+ else
+ {
+ rtree::copy_from_back(elements_copy, elements_copy.begin() + seed1); // MAY THROW, STRONG (copy)
+ elements_copy.pop_back();
+ rtree::copy_from_back(elements_copy, elements_copy.begin() + seed2); // MAY THROW, STRONG (copy)
+ elements_copy.pop_back();
+ }
+
+ // initialize areas
+ content_type content1 = index::content(box1);
+ content_type content2 = index::content(box2);
+
+ size_t remaining = elements_copy.size();
+
+ // redistribute the rest of the elements
+ while ( !elements_copy.empty() )
+ {
+ typename elements_type::reverse_iterator el_it = elements_copy.rbegin();
+ bool insert_into_group1 = false;
+
+ size_t elements1_count = elements1.size();
+ size_t elements2_count = elements2.size();
+
+ // 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.get_min_elements() )
+ {
+ insert_into_group1 = true;
+ }
+ else if ( elements2_count + remaining <= parameters.get_min_elements() )
+ {
+ insert_into_group1 = false;
+ }
+ // insert the best element
+ else
+ {
+ // find element with minimum groups areas increses differences
+ content_type content_increase1 = 0;
+ content_type content_increase2 = 0;
+ el_it = pick_next(elements_copy.rbegin(), elements_copy.rend(),
+ box1, box2, content1, content2, translator,
+ content_increase1, content_increase2);
+
+ if ( content_increase1 < content_increase2 ||
+ ( content_increase1 == content_increase2 && content1 < content2 ) ||
+ ( content1 == content2 && elements1_count <= elements2_count ) )
+ {
+ insert_into_group1 = true;
+ }
+ else
+ {
+ insert_into_group1 = false;
+ }
+ }
+
+ // move element to the choosen group
+ element_type const& elem = *el_it;
+ indexable_type const& indexable = rtree::element_indexable(elem, translator);
+
+ if ( insert_into_group1 )
+ {
+ elements1.push_back(elem); // MAY THROW, STRONG (copy)
+ geometry::expand(box1, indexable);
+ content1 = index::content(box1);
+ }
+ else
+ {
+ elements2.push_back(elem); // MAY THROW, STRONG (alloc, copy)
+ geometry::expand(box2, indexable);
+ content2 = index::content(box2);
+ }
+
+ BOOST_GEOMETRY_INDEX_ASSERT(!elements_copy.empty(), "expected more elements");
+ typename elements_type::iterator el_it_base = el_it.base();
+ rtree::copy_from_back(elements_copy, --el_it_base); // MAY THROW, STRONG (copy)
+ elements_copy.pop_back();
+
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < remaining, "expected more remaining elements");
+ --remaining;
+ }
+ }
+ catch(...)
+ {
+ //elements_copy.clear();
+ elements1.clear();
+ elements2.clear();
+
+ rtree::destroy_elements<Value, Options, Translator, Box, Allocators>::apply(elements_backup, allocators);
+ //elements_backup.clear();
+
+ throw; // RETHROW, BASIC
+ }
+ }
+
+ // TODO: awulkiew - change following function to static member of the pick_next class?
+
+ template <typename It>
+ 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& translator,
+ content_type & out_content_increase1, content_type & out_content_increase2)
+ {
+ typedef typename boost::iterator_value<It>::type element_type;
+ typedef typename rtree::element_indexable_type<element_type, Translator>::type indexable_type;
+
+ content_type greatest_content_incrase_diff = 0;
+ It out_it = first;
+ out_content_increase1 = 0;
+ out_content_increase2 = 0;
+
+ // 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, translator);
+
+ // calculate enlarged boxes and areas
+ Box enlarged_box1(box1);
+ Box enlarged_box2(box2);
+ geometry::expand(enlarged_box1, indexable);
+ geometry::expand(enlarged_box2, indexable);
+ content_type enlarged_content1 = index::content(enlarged_box1);
+ content_type enlarged_content2 = index::content(enlarged_box2);
+
+ content_type content_incrase1 = (enlarged_content1 - content1);
+ content_type content_incrase2 = (enlarged_content2 - content2);
+
+ content_type content_incrase_diff = content_incrase1 < content_incrase2 ?
+ content_incrase2 - content_incrase1 : content_incrase1 - content_incrase2;
+
+ if ( greatest_content_incrase_diff < content_incrase_diff )
+ {
+ greatest_content_incrase_diff = content_incrase_diff;
+ out_it = el_it;
+ out_content_increase1 = content_incrase1;
+ out_content_increase2 = content_incrase2;
+ }
+ }
+
+ return out_it;
+ }
+};
+
+} // namespace detail
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_QUADRATIC_REDISTRIBUTE_ELEMENTS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/choose_next_node.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/choose_next_node.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,248 @@
+// Boost.Geometry Index
+//
+// R-tree R*-tree next node choosing algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_CHOOSE_NEXT_NODE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_CHOOSE_NEXT_NODE_HPP
+
+#include <algorithm>
+
+#include <boost/geometry/algorithms/expand.hpp>
+
+#include <boost/geometry/extensions/index/algorithms/content.hpp>
+#include <boost/geometry/extensions/index/algorithms/intersection_content.hpp>
+#include <boost/geometry/extensions/index/algorithms/union_content.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+template <typename Value, typename Options, typename Box, typename Allocators>
+class choose_next_node<Value, Options, Box, Allocators, choose_by_overlap_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 rtree::elements_type<internal_node>::type children_type;
+ typedef typename children_type::value_type child_type;
+
+ typedef typename Options::parameters_type parameters_type;
+
+ typedef typename index::default_content_result<Box>::type content_type;
+
+public:
+ template <typename Indexable>
+ 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.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);
+ }
+ // children are internal nodes
+ else
+ return choose_by_minimum_content_cost(children, indexable);
+ }
+
+private:
+ template <typename Indexable>
+ static inline size_t choose_by_minimum_overlap_cost(children_type const& children,
+ Indexable const& indexable)
+ {
+ size_t children_count = children.size();
+
+ // choose index with smallest overlap change value, or content change or smallest content
+ size_t choosen_index = 0;
+ content_type smallest_overlap_diff = (std::numeric_limits<content_type>::max)();
+ content_type smallest_content_diff = (std::numeric_limits<content_type>::max)();
+ content_type smallest_content = (std::numeric_limits<content_type>::max)();
+
+ // for each child node
+ for (size_t i = 0 ; i < children_count ; ++i )
+ {
+ child_type const& ch_i = children[i];
+
+ Box box_exp(ch_i.first);
+ // calculate expanded box of child node ch_i
+ geometry::expand(box_exp, indexable);
+
+ // calculate content and content diff
+ content_type content = index::content(ch_i.first);
+ content_type content_diff = index::content(box_exp) - content;
+
+ content_type overlap = 0;
+ content_type overlap_exp = 0;
+
+ // calculate overlap
+ for ( size_t j = 0 ; j < children_count ; ++j )
+ {
+ if ( i != j )
+ {
+ child_type const& ch_j = children[j];
+
+ overlap += index::intersection_content(ch_i.first, ch_j.first);
+ overlap_exp += index::intersection_content(box_exp, ch_j.first);
+ }
+ }
+
+ content_type overlap_diff = overlap_exp - overlap;
+
+ // update result
+ if ( overlap_diff < smallest_overlap_diff ||
+ ( overlap_diff == smallest_overlap_diff && content_diff < smallest_content_diff ) ||
+ ( content_diff == smallest_content_diff && content < smallest_content ) )
+ {
+ smallest_overlap_diff = overlap_diff;
+ smallest_content_diff = content_diff;
+ smallest_content = content;
+ choosen_index = i;
+ }
+ }
+
+ return choosen_index;
+ }
+
+ template <typename 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();
+
+ // create container of children sorted by content enlargement needed to include the new value
+ std::vector< boost::tuple<size_t, content_type, content_type> > sorted_children(children_count);
+ for ( size_t i = 0 ; i < children_count ; ++i )
+ {
+ child_type const& ch_i = children[i];
+
+ // expanded child node's box
+ Box box_exp(ch_i.first);
+ geometry::expand(box_exp, indexable);
+
+ // areas difference
+ content_type content = index::content(box_exp);
+ content_type content_diff = content - index::content(ch_i.first);
+
+ sorted_children[i] = boost::make_tuple(i, content_diff, content);
+ }
+
+ // sort by content_diff
+ std::sort(sorted_children.begin(), sorted_children.end(), content_diff_less);
+
+ 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 < overlap_cost_threshold ; ++i )
+ {
+ size_t child_index = boost::get<0>(sorted_children[i]);
+
+ typedef typename children_type::value_type child_type;
+ child_type const& ch_i = children[child_index];
+
+ Box box_exp(ch_i.first);
+ // calculate expanded box of child node ch_i
+ geometry::expand(box_exp, indexable);
+
+ content_type overlap = 0;
+ content_type overlap_exp = 0;
+
+ // calculate overlap
+ for ( size_t j = 0 ; j < children_count ; ++j )
+ {
+ if ( child_index != j )
+ {
+ child_type const& ch_j = children[j];
+
+ overlap += index::intersection_content(ch_i.first, ch_j.first);
+ overlap_exp += index::intersection_content(box_exp, ch_j.first);
+ }
+ }
+
+ content_type overlap_diff = overlap_exp - overlap;
+
+ // update result
+ if ( overlap_diff < smallest_overlap_diff )
+ {
+ smallest_overlap_diff = overlap_diff;
+ choosen_index = child_index;
+ }
+ }
+
+ return choosen_index;
+ }
+
+ static inline bool content_diff_less(boost::tuple<size_t, content_type, content_type> const& p1, boost::tuple<size_t, content_type, content_type> const& p2)
+ {
+ return boost::get<1>(p1) < boost::get<1>(p2) ||
+ (boost::get<1>(p1) == boost::get<1>(p2) && boost::get<2>(p1) < boost::get<2>(p2));
+ }
+
+ template <typename Indexable>
+ static inline size_t choose_by_minimum_content_cost(children_type const& children, Indexable const& indexable)
+ {
+ size_t children_count = children.size();
+
+ // choose index with smallest content change or smallest content
+ size_t choosen_index = 0;
+ content_type smallest_content_diff = (std::numeric_limits<content_type>::max)();
+ content_type smallest_content = (std::numeric_limits<content_type>::max)();
+
+ // choose the child which requires smallest box expansion to store the indexable
+ for ( size_t i = 0 ; i < children_count ; ++i )
+ {
+ child_type const& ch_i = children[i];
+
+ // expanded child node's box
+ Box box_exp(ch_i.first);
+ geometry::expand(box_exp, indexable);
+
+ // areas difference
+ content_type content = index::content(box_exp);
+ content_type content_diff = content - index::content(ch_i.first);
+
+ // update the result
+ if ( content_diff < smallest_content_diff ||
+ ( content_diff == smallest_content_diff && content < smallest_content ) )
+ {
+ smallest_content_diff = content_diff;
+ smallest_content = content;
+ choosen_index = i;
+ }
+ }
+
+ return choosen_index;
+ }
+};
+
+} // namespace detail
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_CHOOSE_NEXT_NODE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/insert.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,529 @@
+// Boost.Geometry Index
+//
+// R-tree R*-tree insert algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_INSERT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_INSERT_HPP
+
+#include <boost/geometry/extensions/index/algorithms/content.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+namespace rstar {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class remove_elements_to_reinsert
+{
+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;
+
+ template <typename Node>
+ static inline void apply(typename rtree::elements_type<Node>::type & result_elements,
+ Node & n,
+ internal_node *parent,
+ size_t current_child_index,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ {
+ typedef typename rtree::elements_type<Node>::type elements_type;
+ typedef typename elements_type::value_type element_type;
+ typedef typename geometry::point_type<Box>::type point_type;
+ // TODO: awulkiew - change second point_type to the point type of the Indexable?
+ typedef typename geometry::default_distance_result<point_type>::type distance_type;
+
+ elements_type & elements = rtree::elements(n);
+
+ 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");
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < reinserted_elements_count, "wrong value of elements to reinsert");
+
+ // calculate current node's center
+ point_type node_center;
+ geometry::centroid(rtree::elements(*parent)[current_child_index].first, node_center);
+
+ // fill the container of centers' distances of children from current node's center
+ typedef typename index::detail::rtree::container_from_elements_type<
+ elements_type,
+ std::pair<distance_type, element_type>
+ >::type sorted_elements_type;
+ sorted_elements_type sorted_elements;
+ // If constructor is used instead of resize() MS implementation leaks here
+ sorted_elements.reserve(elements_count); // MAY THROW, STRONG (V, E: alloc, copy)
+
+ for ( typename elements_type::const_iterator it = elements.begin() ;
+ it != elements.end() ; ++it )
+ {
+ point_type element_center;
+ geometry::centroid( rtree::element_indexable(*it, translator), element_center);
+ sorted_elements.push_back(std::make_pair(
+ geometry::comparable_distance(node_center, element_center),
+ *it)); // MAY THROW (V, E: copy)
+ }
+
+ // sort elements by distances from center
+ std::partial_sort(
+ sorted_elements.begin(),
+ sorted_elements.begin() + reinserted_elements_count,
+ sorted_elements.end(),
+ distances_dsc<distance_type, element_type>); // MAY THROW, BASIC (V, E: copy)
+
+ // copy elements which will be reinserted
+ result_elements.clear();
+ result_elements.reserve(reinserted_elements_count); // MAY THROW, STRONG (V, E: alloc, copy)
+ for ( typename sorted_elements_type::const_iterator it = sorted_elements.begin() ;
+ it != sorted_elements.begin() + reinserted_elements_count ; ++it )
+ {
+ result_elements.push_back(it->second); // MAY THROW (V, E: copy)
+ }
+
+ try
+ {
+ // copy remaining elements to the current node
+ elements.clear();
+ elements.reserve(elements_count - reinserted_elements_count); // SHOULDN'T THROW (new_size <= old size)
+ for ( typename sorted_elements_type::const_iterator it = sorted_elements.begin() + reinserted_elements_count;
+ it != sorted_elements.end() ; ++it )
+ {
+ elements.push_back(it->second); // MAY THROW (V, E: copy)
+ }
+ }
+ catch(...)
+ {
+ elements.clear();
+
+ for ( typename sorted_elements_type::iterator it = sorted_elements.begin() ;
+ it != sorted_elements.end() ; ++it )
+ {
+ destroy_element<Value, Options, Translator, Box, Allocators>::apply(it->second, allocators);
+ }
+
+ throw; // RETHROW
+ }
+ }
+
+private:
+ template <typename Distance, typename El>
+ static inline bool distances_asc(
+ std::pair<Distance, El> const& d1,
+ std::pair<Distance, El> const& d2)
+ {
+ return d1.first < d2.first;
+ }
+
+ template <typename Distance, typename El>
+ static inline bool distances_dsc(
+ std::pair<Distance, El> const& d1,
+ std::pair<Distance, El> const& d2)
+ {
+ return d1.first > d2.first;
+ }
+};
+
+template <size_t InsertIndex, typename Element, typename Value, typename Options, typename Box, typename Allocators>
+struct level_insert_elements_type
+{
+ typedef typename rtree::elements_type<
+ typename rtree::internal_node<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type
+ >::type type;
+};
+
+template <typename Value, typename Options, typename Box, typename Allocators>
+struct level_insert_elements_type<0, Value, Value, Options, Box, Allocators>
+{
+ typedef typename rtree::elements_type<
+ typename rtree::leaf<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag>::type
+ >::type type;
+};
+
+template <size_t InsertIndex, typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct level_insert_base
+ : public detail::insert<Element, Value, Options, Translator, Box, Allocators>
+{
+ typedef detail::insert<Element, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ typedef typename base::internal_node internal_node;
+ typedef typename base::leaf leaf;
+
+ typedef typename level_insert_elements_type<InsertIndex, Element, Value, Options, Box, Allocators>::type elements_type;
+ typedef typename Options::parameters_type parameters_type;
+
+ inline level_insert_base(node* & root,
+ size_t & leafs_level,
+ Element const& element,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level)
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
+ , result_relative_level(0)
+ {}
+
+ template <typename Node>
+ inline void handle_possible_reinsert_or_split_of_root(Node &n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(result_elements.empty(), "reinsert should be handled only once for level");
+
+ result_relative_level = base::m_leafs_level - base::m_traverse_data.current_level;
+
+ // overflow
+ if ( base::m_parameters.get_max_elements() < rtree::elements(n).size() )
+ {
+ // node isn't root node
+ if ( !base::m_traverse_data.current_is_root() )
+ {
+ // NOTE: exception-safety
+ // After an exception result_elements may contain garbage, don't use it
+ rstar::remove_elements_to_reinsert<Value, Options, Translator, Box, Allocators>::apply(
+ result_elements, n,
+ base::m_traverse_data.parent, base::m_traverse_data.current_child_index,
+ base::m_parameters, base::m_translator, base::m_allocators); // MAY THROW, BASIC (V, E: alloc, copy)
+ }
+ // node is root node
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<Node>(base::m_root_node), "node should be the root node");
+ base::split(n); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ }
+ }
+
+ template <typename Node>
+ inline void handle_possible_split(Node &n) const
+ {
+ // overflow
+ if ( base::m_parameters.get_max_elements() < rtree::elements(n).size() )
+ {
+ base::split(n); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ }
+
+ template <typename Node>
+ inline void recalculate_aabb_if_necessary(Node &n) const
+ {
+ if ( !result_elements.empty() && !base::m_traverse_data.current_is_root() )
+ {
+ // calulate node's new box
+ base::m_traverse_data.current_element().first =
+ elements_box<Box>(rtree::elements(n).begin(), rtree::elements(n).end(), base::m_translator);
+ }
+ }
+
+ size_t result_relative_level;
+ elements_type result_elements;
+};
+
+template <size_t InsertIndex, typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct level_insert
+ : public level_insert_base<InsertIndex, Element, Value, Options, Translator, Box, Allocators>
+{
+ typedef level_insert_base<InsertIndex, Element, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ 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,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level)
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_leafs_level, "unexpected level");
+
+ if ( base::m_traverse_data.current_level < base::m_level )
+ {
+ // next traversing step
+ base::traverse(*this, n); // MAY THROW (E: alloc, copy, N: alloc)
+
+ // further insert
+ if ( 0 < InsertIndex )
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < base::m_level, "illegal level value, level shouldn't be the root level for 0 < InsertIndex");
+
+ if ( base::m_traverse_data.current_level == base::m_level - 1 )
+ {
+ base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+ }
+ }
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level, "unexpected level");
+
+ try
+ {
+ // push new child node
+ rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (E: alloc, copy)
+ }
+ catch(...)
+ {
+ // NOTE: exception-safety
+ // if the insert fails above, the element won't be stored in the tree, so delete it
+
+ rtree::visitors::destroy<Value, Options, Translator, Box, Allocators> del_v(base::m_element.second, base::m_allocators);
+ rtree::apply_visitor(del_v, *base::m_element.second);
+
+ throw; // RETHROW
+ }
+
+ // first insert
+ if ( 0 == InsertIndex )
+ {
+ base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+ // not the first insert
+ else
+ {
+ base::handle_possible_split(n); // MAY THROW (E: alloc, N: alloc)
+ }
+ }
+
+ base::recalculate_aabb_if_necessary(n);
+ }
+
+ inline void operator()(leaf &)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(false, "this visitor can't be used for a leaf");
+ }
+};
+
+template <size_t InsertIndex, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct level_insert<InsertIndex, Value, Value, Options, Translator, Box, Allocators>
+ : public level_insert_base<InsertIndex, Value, Value, Options, Translator, Box, Allocators>
+{
+ typedef level_insert_base<InsertIndex, Value, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ 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,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level)
+ : base(root, leafs_level, v, parameters, translator, allocators, relative_level)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_leafs_level, "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_level, "unexpected level");
+
+ // next traversing step
+ base::traverse(*this, n); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < base::m_level, "illegal level value, level shouldn't be the root level for 0 < InsertIndex");
+
+ if ( base::m_traverse_data.current_level == base::m_level - 1 )
+ {
+ base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+
+ base::recalculate_aabb_if_necessary(n);
+ }
+
+ inline void operator()(leaf & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level == base::m_leafs_level,
+ "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level ||
+ base::m_level == (std::numeric_limits<size_t>::max)(),
+ "unexpected level");
+
+ rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy)
+
+ base::handle_possible_split(n); // MAY THROW (V: alloc, copy, N: alloc)
+ }
+};
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct level_insert<0, Value, Value, Options, Translator, Box, Allocators>
+ : public level_insert_base<0, Value, Value, Options, Translator, Box, Allocators>
+{
+ typedef level_insert_base<0, Value, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ 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,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level)
+ : base(root, leafs_level, v, parameters, translator, allocators, relative_level)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_leafs_level,
+ "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_level,
+ "unexpected level");
+
+ // next traversing step
+ base::traverse(*this, n); // MAY THROW (V: alloc, copy, N: alloc)
+
+ base::recalculate_aabb_if_necessary(n);
+ }
+
+ inline void operator()(leaf & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level == base::m_leafs_level,
+ "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level ||
+ base::m_level == (std::numeric_limits<size_t>::max)(),
+ "unexpected level");
+
+ rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy)
+
+ base::handle_possible_reinsert_or_split_of_root(n); // MAY THROW (V: alloc, copy, N: alloc)
+
+ base::recalculate_aabb_if_necessary(n);
+ }
+};
+
+} // namespace rstar
+
+} // namespace detail
+
+// R*-tree insert visitor
+// After passing the Element to insert visitor the Element is managed by the tree
+// I.e. one should not delete the node passed to the insert visitor after exception is thrown
+// because this visitor may delete it
+template <typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class insert<Element, Value, Options, Translator, Box, Allocators, insert_reinsert_tag>
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
+ , index::detail::nonassignable
+{
+ 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,
+ 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_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))
+ {
+ 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_parameters, m_translator, m_allocators, m_relative_level);
+
+ rtree::apply_visitor(lins_v, *m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ if ( !lins_v.result_elements.empty() )
+ {
+ recursive_reinsert(lins_v.result_elements, lins_v.result_relative_level); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ }
+
+ inline void operator()(leaf & BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(n))
+ {
+ 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_parameters, m_translator, m_allocators, m_relative_level);
+
+ rtree::apply_visitor(lins_v, *m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ // we're in the root, so root should be split and there should be no elements to reinsert
+ BOOST_GEOMETRY_INDEX_ASSERT(lins_v.result_elements.empty(), "unexpected state");
+ }
+
+private:
+ template <typename Elements>
+ inline void recursive_reinsert(Elements & elements, size_t relative_level)
+ {
+ typedef typename Elements::value_type element_type;
+
+ // reinsert children starting from the minimum distance
+ typename Elements::reverse_iterator it = elements.rbegin();
+ for ( ; 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_parameters, m_translator, m_allocators, relative_level);
+
+ try
+ {
+ rtree::apply_visitor(lins_v, *m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ catch(...)
+ {
+ ++it;
+ for ( ; it != elements.rend() ; ++it)
+ rtree::destroy_element<Value, Options, Translator, Box, Allocators>::apply(*it, m_allocators);
+ throw; // RETHROW
+ }
+
+ BOOST_GEOMETRY_INDEX_ASSERT(relative_level + 1 == lins_v.result_relative_level, "unexpected level");
+
+ // non-root relative level
+ if ( lins_v.result_relative_level < m_leafs_level && !lins_v.result_elements.empty())
+ {
+ recursive_reinsert(lins_v.result_elements, lins_v.result_relative_level); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ }
+ }
+
+ node* & m_root;
+ size_t & m_leafs_level;
+ Element const& m_element;
+
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
+
+ size_t m_relative_level;
+
+ Allocators m_allocators;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_INSERT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,412 @@
+// Boost.Geometry Index
+//
+// R-tree R*-tree split algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
+
+#include <boost/geometry/extensions/index/detail/nonassignable.hpp>
+
+#include <boost/geometry/extensions/index/algorithms/intersection_content.hpp>
+#include <boost/geometry/extensions/index/algorithms/union_content.hpp>
+#include <boost/geometry/extensions/index/algorithms/margin.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+namespace rstar {
+
+template <typename Element, typename Translator, size_t Corner, size_t AxisIndex>
+class element_axis_corner_less
+ : index::detail::nonassignable
+{
+public:
+ element_axis_corner_less(Translator const& tr)
+ : m_tr(tr)
+ {}
+
+ bool operator()(Element const& e1, Element const& e2) const
+ {
+ return index::get<Corner, AxisIndex>(rtree::element_indexable(e1, m_tr))
+ < index::get<Corner, AxisIndex>(rtree::element_indexable(e2, m_tr));
+ }
+
+private:
+ Translator const& m_tr;
+};
+
+template <typename Parameters, typename Box, size_t Corner, size_t AxisIndex>
+struct choose_split_axis_and_index_for_corner
+{
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements const& elements,
+ size_t & choosen_index,
+ margin_type & sum_of_margins,
+ content_type & smallest_overlap,
+ content_type & smallest_content,
+ Parameters const& parameters,
+ Translator const& translator)
+ {
+ typedef typename Elements::value_type element_type;
+
+ BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == parameters.get_max_elements() + 1, "wrong number of elements");
+
+ // copy elements
+ Elements elements_copy(elements); // MAY THROW, STRONG (alloc, copy)
+
+ // sort elements
+ element_axis_corner_less<element_type, Translator, Corner, AxisIndex> elements_less(translator);
+ std::sort(elements_copy.begin(), elements_copy.end(), elements_less); // MAY THROW, BASIC (copy)
+
+ // init outputs
+ 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.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, translator);
+ Box box2 = rtree::elements_box<Box>(elements_copy.begin() + i, elements_copy.end(), translator);
+
+ sum_of_margins += index::margin(box1) + index::margin(box2);
+
+ content_type ovl = index::intersection_content(box1, box2);
+ content_type con = index::content(box1) + index::content(box2);
+
+ if ( ovl < smallest_overlap || (ovl == smallest_overlap && con <= smallest_content) )
+ {
+ choosen_index = i;
+ smallest_overlap = ovl;
+ smallest_content = con;
+ }
+ }
+ }
+};
+
+template <typename Parameters, typename Box, size_t AxisIndex, typename ElementIndexableTag>
+struct choose_split_axis_and_index_for_axis
+{
+ //BOOST_STATIC_ASSERT(0);
+};
+
+template <typename Parameters, typename Box, size_t AxisIndex>
+struct choose_split_axis_and_index_for_axis<Parameters, Box, AxisIndex, box_tag>
+{
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements const& elements,
+ size_t & choosen_corner,
+ size_t & choosen_index,
+ margin_type & sum_of_margins,
+ content_type & smallest_overlap,
+ content_type & smallest_content,
+ Parameters const& parameters,
+ Translator const& translator)
+ {
+ size_t index1 = 0;
+ margin_type som1 = 0;
+ content_type ovl1 = (std::numeric_limits<content_type>::max)();
+ content_type con1 = (std::numeric_limits<content_type>::max)();
+
+ choose_split_axis_and_index_for_corner<Parameters, Box, min_corner, AxisIndex>::
+ apply(elements, index1,
+ som1, ovl1, con1,
+ parameters, translator); // MAY THROW, STRONG
+
+ size_t index2 = 0;
+ margin_type som2 = 0;
+ content_type ovl2 = (std::numeric_limits<content_type>::max)();
+ content_type con2 = (std::numeric_limits<content_type>::max)();
+
+ choose_split_axis_and_index_for_corner<Parameters, Box, max_corner, AxisIndex>::
+ apply(elements, index2,
+ som2, ovl2, con2,
+ parameters, translator); // MAY THROW, STRONG
+
+ sum_of_margins = som1 + som2;
+
+ if ( ovl1 < ovl2 || (ovl1 == ovl2 && con1 <= con2) )
+ {
+ choosen_corner = min_corner;
+ choosen_index = index1;
+ smallest_overlap = ovl1;
+ smallest_content = con1;
+ }
+ else
+ {
+ choosen_corner = max_corner;
+ choosen_index = index2;
+ smallest_overlap = ovl2;
+ smallest_content = con2;
+ }
+ }
+};
+
+template <typename Parameters, typename Box, size_t AxisIndex>
+struct choose_split_axis_and_index_for_axis<Parameters, Box, AxisIndex, point_tag>
+{
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements const& elements,
+ size_t & choosen_corner,
+ size_t & choosen_index,
+ margin_type & sum_of_margins,
+ content_type & smallest_overlap,
+ content_type & smallest_content,
+ 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,
+ parameters, translator); // MAY THROW, STRONG
+
+ choosen_corner = min_corner;
+ }
+};
+
+template <typename Parameters, typename Box, size_t Dimension>
+struct choose_split_axis_and_index
+{
+ BOOST_STATIC_ASSERT(0 < Dimension);
+
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements const& elements,
+ size_t & choosen_axis,
+ size_t & choosen_corner,
+ size_t & choosen_index,
+ margin_type & smallest_sum_of_margins,
+ content_type & smallest_overlap,
+ content_type & smallest_content,
+ 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,
+ parameters, translator); // MAY THROW, STRONG
+
+ margin_type sum_of_margins = 0;
+
+ size_t corner = min_corner;
+ size_t index = 0;
+
+ content_type overlap_val = (std::numeric_limits<content_type>::max)();
+ content_type content_val = (std::numeric_limits<content_type>::max)();
+
+ choose_split_axis_and_index_for_axis<
+ Parameters,
+ Box,
+ Dimension - 1,
+ typename index::traits::tag<element_indexable_type>::type
+ >::apply(elements, corner, index, sum_of_margins, overlap_val, content_val, parameters, translator); // MAY THROW, STRONG
+
+ if ( sum_of_margins < smallest_sum_of_margins )
+ {
+ choosen_axis = Dimension - 1;
+ choosen_corner = corner;
+ choosen_index = index;
+ smallest_sum_of_margins = sum_of_margins;
+ smallest_overlap = overlap_val;
+ smallest_content = content_val;
+ }
+ }
+};
+
+template <typename Parameters, typename Box>
+struct choose_split_axis_and_index<Parameters, Box, 1>
+{
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements const& elements,
+ size_t & choosen_axis,
+ size_t & choosen_corner,
+ size_t & choosen_index,
+ margin_type & smallest_sum_of_margins,
+ content_type & smallest_overlap,
+ content_type & smallest_content,
+ Parameters const& parameters,
+ Translator const& translator)
+ {
+ typedef typename rtree::element_indexable_type<typename Elements::value_type, Translator>::type element_indexable_type;
+
+ choosen_axis = 0;
+
+ choose_split_axis_and_index_for_axis<
+ Parameters,
+ Box,
+ 0,
+ typename index::traits::tag<element_indexable_type>::type
+ >::apply(elements, choosen_corner, choosen_index, smallest_sum_of_margins, smallest_overlap, smallest_content, parameters, translator); // MAY THROW
+ }
+};
+
+template <size_t Corner, size_t Dimension>
+struct partial_sort
+{
+ BOOST_STATIC_ASSERT(0 < Dimension);
+
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements & elements, const size_t axis, const size_t index, Translator const& tr)
+ {
+ if ( axis < Dimension - 1 )
+ {
+ partial_sort<Corner, Dimension - 1>::apply(elements, axis, index, tr); // MAY THROW, BASIC (copy)
+ }
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(axis == Dimension - 1, "unexpected axis value");
+
+ typedef typename Elements::value_type element_type;
+ element_axis_corner_less<element_type, Translator, Corner, Dimension - 1> less(tr);
+ std::partial_sort(elements.begin(), elements.begin() + index, elements.end(), less); // MAY THROW, BASIC (copy)
+ }
+ }
+};
+
+template <size_t Corner>
+struct partial_sort<Corner, 1>
+{
+ template <typename Elements, typename Translator>
+ static inline void apply(Elements & elements,
+ const size_t BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(axis),
+ const size_t index,
+ Translator const& tr)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(axis == 0, "unexpected axis value");
+
+ typedef typename Elements::value_type element_type;
+ element_axis_corner_less<element_type, Translator, Corner, 0> less(tr);
+ std::partial_sort(elements.begin(), elements.begin() + index, elements.end(), less); // MAY THROW, BASIC (copy)
+ }
+};
+
+} // namespace rstar
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct redistribute_elements<Value, Options, Translator, Box, Allocators, rstar_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;
+
+ static const size_t dimension = index::traits::dimension<Box>::value;
+
+ typedef typename index::default_margin_result<Box>::type margin_type;
+ typedef typename index::default_content_result<Box>::type content_type;
+
+ template <typename Node>
+ static inline void apply(
+ Node & n,
+ Node & second_node,
+ Box & box1,
+ Box & box2,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ {
+ typedef typename rtree::elements_type<Node>::type elements_type;
+
+ elements_type & elements1 = rtree::elements(n);
+ elements_type & elements2 = rtree::elements(second_node);
+
+ size_t split_axis = 0;
+ size_t split_corner = 0;
+ 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)();
+
+ rstar::choose_split_axis_and_index<
+ typename Options::parameters_type,
+ Box,
+ index::traits::dimension<Box>::value
+ >::apply(elements1,
+ split_axis, split_corner, split_index,
+ smallest_sum_of_margins, smallest_overlap, smallest_content,
+ parameters, translator); // MAY THROW, STRONG
+
+ // 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.get_min_elements() <= split_index && split_index <= parameters.get_max_elements() - parameters.get_min_elements() + 1, "unexpected value");
+
+ // copy original elements
+ elements_type elements_copy(elements1); // MAY THROW, STRONG
+ elements_type elements_backup(elements1); // MAY THROW, STRONG
+
+ // 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(elements_copy, split_axis, split_index, translator); // MAY THROW, BASIC (copy)
+ else
+ rstar::partial_sort<max_corner, dimension>
+ ::apply(elements_copy, split_axis, split_index, translator); // MAY THROW, BASIC (copy)
+
+ try
+ {
+ // copy elements to nodes
+ elements1.assign(elements_copy.begin(), elements_copy.begin() + split_index); // MAY THROW, BASIC
+ elements2.assign(elements_copy.begin() + split_index, elements_copy.end()); // MAY THROW, BASIC
+
+ // calculate boxes
+ box1 = rtree::elements_box<Box>(elements1.begin(), elements1.end(), translator);
+ box2 = rtree::elements_box<Box>(elements2.begin(), elements2.end(), translator);
+ }
+ catch(...)
+ {
+ //elements_copy.clear();
+ elements1.clear();
+ elements2.clear();
+
+ rtree::destroy_elements<Value, Options, Translator, Box, Allocators>::apply(elements_backup, allocators);
+ //elements_backup.clear();
+
+ throw; // RETHROW, BASIC
+ }
+ }
+};
+
+} // namespace detail
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/rstar.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/rstar/rstar.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,18 @@
+// Boost.Geometry Index
+//
+// R-tree R*-tree algorithm implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_RSTAR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_RSTAR_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/rstar/insert.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/rstar/choose_next_node.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/rstar/redistribute_elements.hpp>
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RSTAR_RSTAR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_boxes_ok.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_boxes_ok.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,141 @@
+// Boost.Geometry Index
+//
+// R-tree boxes validating visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_BOXES_OK_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_BOXES_OK_HPP
+
+#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree {
+
+namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class are_boxes_ok
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::nonassignable
+{
+ 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;
+
+public:
+ are_boxes_ok(Translator const& tr, bool exact_match)
+ : result(false), m_tr(tr), m_is_root(true), m_exact_match(exact_match)
+ {}
+
+ void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ if (elements.empty())
+ {
+ result = false;
+ return;
+ }
+
+ Box box_bckup = m_box;
+ bool is_root_bckup = m_is_root;
+
+ m_is_root = false;
+
+ for ( typename elements_type::const_iterator it = elements.begin();
+ it != elements.end() ; ++it)
+ {
+ m_box = it->first;
+
+ rtree::apply_visitor(*this, *it->second);
+
+ if ( result == false )
+ return;
+ }
+
+ m_box = box_bckup;
+ m_is_root = is_root_bckup;
+
+ Box box_exp;
+ geometry::convert(elements.front().first, box_exp);
+ for( typename elements_type::const_iterator it = elements.begin() + 1;
+ it != elements.end() ; ++it)
+ {
+ geometry::expand(box_exp, it->first);
+ }
+
+ if ( m_exact_match )
+ result = m_is_root || geometry::equals(box_exp, m_box);
+ else
+ result = m_is_root || geometry::covered_by(box_exp, m_box);
+ }
+
+ void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // non-root node
+ if (!m_is_root)
+ {
+ if ( elements.empty() )
+ {
+ result = false;
+ return;
+ }
+
+ Box box_exp;
+ geometry::convert(m_tr(elements.front()), box_exp);
+ for(typename elements_type::const_iterator it = elements.begin() + 1;
+ it != elements.end() ; ++it)
+ {
+ geometry::expand(box_exp, m_tr(*it));
+ }
+
+ if ( m_exact_match )
+ result = geometry::equals(box_exp, m_box);
+ else
+ result = geometry::covered_by(box_exp, m_box);
+ }
+ else
+ result = true;
+ }
+
+ bool result;
+
+private:
+ Translator const& m_tr;
+ Box m_box;
+ bool m_is_root;
+ bool m_exact_match;
+};
+
+} // namespace visitors
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator>
+bool are_boxes_ok(index::rtree<Value, Parameters, Translator, Allocator> const& tree,
+ bool exact_match = true)
+{
+ typedef index::rtree<Value, Parameters, Translator, Allocator> rt;
+
+ detail::rtree::visitors::are_boxes_ok<
+ typename rt::value_type,
+ typename rt::options_type,
+ typename rt::translator_type,
+ typename rt::box_type,
+ typename rt::allocators_type
+ > v(tree.translator(), exact_match);
+
+ tree.apply_visitor(v);
+
+ return v.result;
+}
+
+}}}}} // namespace boost::geometry::index::detail::rtree
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_BOXES_OK_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_levels_ok.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/are_levels_ok.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,111 @@
+// Boost.Geometry Index
+//
+// R-tree levels validating visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_LEVELS_OK_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_LEVELS_OK_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree {
+
+namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class are_levels_ok
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::nonassignable
+{
+ 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;
+
+public:
+ inline are_levels_ok(Translator const& tr)
+ : result(true), m_tr(tr), m_leafs_level((std::numeric_limits<size_t>::max)()), m_current_level(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ if (elements.empty())
+ {
+ result = false;
+ return;
+ }
+
+ size_t current_level_backup = m_current_level;
+ ++m_current_level;
+
+ for ( typename elements_type::const_iterator it = elements.begin();
+ it != elements.end() ; ++it)
+ {
+ rtree::apply_visitor(*this, *it->second);
+
+ if ( result == false )
+ return;
+ }
+
+ m_current_level = current_level_backup;
+ }
+
+ inline void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // empty leaf in non-root node
+ if (0 < m_current_level && elements.empty())
+ {
+ result = false;
+ return;
+ }
+
+ if ( m_leafs_level == (std::numeric_limits<size_t>::max)() )
+ {
+ m_leafs_level = m_current_level;
+ }
+ else if ( m_leafs_level != m_current_level )
+ {
+ result = false;
+ }
+ }
+
+ bool result;
+
+private:
+ Translator const& m_tr;
+ size_t m_leafs_level;
+ size_t m_current_level;
+};
+
+} // namespace visitors
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator>
+bool are_levels_ok(index::rtree<Value, Parameters, Translator, Allocator> const& tree)
+{
+ typedef index::rtree<Value, Parameters, Translator, Allocator> rt;
+
+ detail::rtree::visitors::are_levels_ok<
+ typename rt::value_type,
+ typename rt::options_type,
+ typename rt::translator_type,
+ typename rt::box_type,
+ typename rt::allocators_type
+ > v(tree.translator());
+
+ tree.apply_visitor(v);
+
+ return v.result;
+}
+
+}}}}} // namespace boost::geometry::index::detail::rtree
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_ARE_LEVELS_OK_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/children_box.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/children_box.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,58 @@
+// Boost.Geometry Index
+//
+// R-tree node children box calculating visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_CHILDREN_BOX_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_CHILDREN_BOX_HPP
+
+#include <boost/geometry/extensions/index/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class children_box
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::nonassignable
+{
+ 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;
+
+public:
+ inline children_box(Box & result, Translator const& tr)
+ : m_result(result), m_tr(tr)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ m_result = rtree::elements_box<Box>(elements.begin(), elements.end(), m_tr);
+ }
+
+ inline void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ m_result = rtree::elements_box<Box>(elements.begin(), elements.end(), m_tr);
+ }
+
+private:
+ Box & m_result;
+ Translator const& m_tr;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_CHILDREN_BOX_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/copy.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,94 @@
+// Boost.Geometry Index
+//
+// R-tree deep copying visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COPY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COPY_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class copy
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
+ , boost::noncopyable
+{
+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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+ explicit inline copy(Allocators & allocators)
+ : result(0)
+ , m_allocators(allocators)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ node * raw_new_node = rtree::create_node<Allocators, internal_node>::apply(m_allocators); // MAY THROW, STRONG (N: alloc)
+ node_auto_ptr new_node(raw_new_node, m_allocators);
+
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type & elements = rtree::elements(n);
+
+ elements_type & elements_dst = rtree::elements(rtree::get<internal_node>(*new_node));
+
+ for (typename elements_type::iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ rtree::apply_visitor(*this, *it->second); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ // for exception safety
+ node_auto_ptr auto_result(result, m_allocators);
+
+ elements_dst.push_back( std::make_pair(it->first, result) ); // MAY THROW, STRONG (E: alloc, copy)
+
+ auto_result.release();
+ }
+
+ result = new_node.get();
+ new_node.release();
+ }
+
+ inline void operator()(leaf & l)
+ {
+ node * raw_new_node = rtree::create_node<Allocators, leaf>::apply(m_allocators); // MAY THROW, STRONG (N: alloc)
+ node_auto_ptr new_node(raw_new_node, m_allocators);
+
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type & elements = rtree::elements(l);
+
+ elements_type & elements_dst = rtree::elements(rtree::get<leaf>(*new_node));
+
+ for (typename elements_type::iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ elements_dst.push_back(*it); // MAY THROW, STRONG (V: alloc, copy)
+ }
+
+ result = new_node.get();
+ new_node.release();
+ }
+
+ node * result;
+
+private:
+ Allocators & m_allocators;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COPY_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/count.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/count.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,122 @@
+// Boost.Geometry Index
+//
+// R-tree count visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COUNT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COUNT_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Indexable, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct count
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::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;
+
+ inline count(Indexable const& i, Translator const& t)
+ : indexable(i), tr(t), found_count(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // traverse nodes meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ if ( geometry::covered_by(indexable, it->first) )
+ 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);
+
+ // get all values meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if value meets predicates
+ if ( geometry::equals(indexable, tr(*it)) )
+ {
+ ++found_count;
+ }
+ }
+ }
+
+ Indexable const& indexable;
+ Translator const& tr;
+ typename Allocators::size_type found_count;
+};
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct count<Value, Value, Options, Translator, Box, Allocators>
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::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;
+
+ inline count(Value const& v, Translator const& t)
+ : value(v), tr(t), found_count(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // traverse nodes meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ if ( geometry::covered_by(tr(value), it->first) )
+ 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);
+
+ // get all values meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if value meets predicates
+ if ( tr.equals(value, *it) )
+ {
+ ++found_count;
+ }
+ }
+ }
+
+ Value const& value;
+ Translator const& tr;
+ typename Allocators::size_type found_count;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_COUNT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/destroy.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/destroy.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,71 @@
+// Boost.Geometry Index
+//
+// R-tree destroying visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_DELETE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_DELETE_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class destroy
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
+ , boost::noncopyable
+{
+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;
+
+ inline destroy(node * root_node, Allocators & allocators)
+ : m_current_node(root_node)
+ , m_allocators(allocators)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<internal_node>(m_current_node), "invalid pointers");
+
+ node * node_to_destroy = m_current_node;
+
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type & elements = rtree::elements(n);
+
+ for (typename elements_type::iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ m_current_node = it->second;
+ rtree::apply_visitor(*this, *m_current_node);
+ it->second = 0;
+ }
+
+ rtree::destroy_node<Allocators, internal_node>::apply(m_allocators, node_to_destroy);
+ }
+
+ inline void operator()(leaf & BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(l))
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(&l == rtree::get<leaf>(m_current_node), "invalid pointers");
+
+ rtree::destroy_node<Allocators, leaf>::apply(m_allocators, m_current_node);
+ }
+
+private:
+ node * m_current_node;
+ Allocators & m_allocators;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_DELETE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/gl_draw.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/gl_draw.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,221 @@
+// Boost.Geometry Index
+//
+// R-tree OpenGL drawing visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_GL_DRAW_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_GL_DRAW_HPP
+
+#include <boost/geometry/extensions/index/indexable.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace dispatch {
+
+template <typename Point, size_t Dimension>
+struct gl_draw_point
+{};
+
+template <typename Point>
+struct gl_draw_point<Point, 2>
+{
+ static inline void apply(Point const& p, typename index::traits::coordinate_type<Point>::type z)
+ {
+ glBegin(GL_POINT);
+ glVertex3f(geometry::get<0>(p), geometry::get<1>(p), z);
+ glEnd();
+ }
+};
+
+template <typename Box, size_t Dimension>
+struct gl_draw_box
+{};
+
+template <typename Box>
+struct gl_draw_box<Box, 2>
+{
+ static inline void apply(Box const& b, typename index::traits::coordinate_type<Box>::type z)
+ {
+ glBegin(GL_LINE_LOOP);
+ glVertex3f(geometry::get<min_corner, 0>(b), geometry::get<min_corner, 1>(b), z);
+ glVertex3f(geometry::get<max_corner, 0>(b), geometry::get<min_corner, 1>(b), z);
+ glVertex3f(geometry::get<max_corner, 0>(b), geometry::get<max_corner, 1>(b), z);
+ glVertex3f(geometry::get<min_corner, 0>(b), geometry::get<max_corner, 1>(b), z);
+ glEnd();
+ }
+};
+
+template <typename Indexable, typename Tag>
+struct gl_draw_indexable
+{
+};
+
+template <typename Indexable>
+struct gl_draw_indexable<Indexable, box_tag>
+{
+ static const size_t dimension = index::traits::dimension<Indexable>::value;
+
+ static inline void apply(Indexable const& i, typename index::traits::coordinate_type<Indexable>::type z)
+ {
+ gl_draw_box<Indexable, dimension>::apply(i, z);
+ }
+};
+
+template <typename Indexable>
+struct gl_draw_indexable<Indexable, point_tag>
+{
+ static const size_t dimension = index::traits::dimension<Indexable>::value;
+
+ static inline void apply(Indexable const& i, typename index::traits::coordinate_type<Indexable>::type z)
+ {
+ gl_draw_point<Indexable, dimension>::apply(i, z);
+ }
+};
+
+} // namespace dispatch
+
+namespace detail {
+
+template <typename Indexable>
+inline void gl_draw_indexable(Indexable const& i, typename index::traits::coordinate_type<Indexable>::type z)
+{
+ dispatch::gl_draw_indexable<
+ Indexable,
+ typename index::traits::tag<Indexable>::type
+ >::apply(i, z);
+}
+
+} // namespace detail
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct gl_draw : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+{
+ 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;
+
+ inline gl_draw(Translator const& t,
+ size_t level_first = 0,
+ size_t level_last = (std::numeric_limits<size_t>::max)(),
+ typename index::traits::coordinate_type<Box>::type z_coord_level_multiplier = 1
+ )
+ : tr(t)
+ , level_f(level_first)
+ , level_l(level_last)
+ , z_mul(z_coord_level_multiplier)
+ , level(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ if ( level_f <= level )
+ {
+ size_t level_rel = level - level_f;
+
+ if ( level_rel == 0 )
+ glColor3f(0.75f, 0.0f, 0.0f);
+ else if ( level_rel == 1 )
+ glColor3f(0.0f, 0.75f, 0.0f);
+ else if ( level_rel == 2 )
+ glColor3f(0.0f, 0.0f, 0.75f);
+ else if ( level_rel == 3 )
+ glColor3f(0.75f, 0.75f, 0.0f);
+ else if ( level_rel == 4 )
+ glColor3f(0.75f, 0.0f, 0.75f);
+ else if ( level_rel == 5 )
+ glColor3f(0.0f, 0.75f, 0.75f);
+ else
+ glColor3f(0.5f, 0.5f, 0.5f);
+
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ detail::gl_draw_indexable(it->first, level_rel * z_mul);
+ }
+ }
+
+ size_t level_backup = level;
+ ++level;
+
+ if ( level < level_l )
+ {
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ rtree::apply_visitor(*this, *it->second);
+ }
+ }
+
+ level = level_backup;
+ }
+
+ inline void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ if ( level_f <= level )
+ {
+ size_t level_rel = level - level_f;
+
+ glColor3f(0.25f, 0.25f, 0.25f);
+
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ detail::gl_draw_indexable(tr(*it), level_rel * z_mul);
+ }
+ }
+ }
+
+ Translator const& tr;
+ size_t level_f;
+ size_t level_l;
+ typename index::traits::coordinate_type<Box>::type z_mul;
+
+ size_t level;
+};
+
+}}} // namespace detail::rtree::visitors
+
+template <typename Value, typename Options, typename Translator, typename Allocator>
+void gl_draw(rtree<Value, Options, Translator, Allocator> const& tree,
+ size_t level_first = 0,
+ size_t level_last = (std::numeric_limits<size_t>::max)(),
+ typename index::traits::coordinate_type<
+ typename rtree<Value, Options, Translator, Allocator>::box_type
+ >::type z_coord_level_multiplier = 1
+ )
+{
+ typedef rtree<Value, Options, Translator, Allocator> rtree_type;
+
+ typedef typename rtree_type::value_type value_type;
+ typedef typename rtree_type::options_type options_type;
+ typedef typename rtree_type::translator_type translator_type;
+ typedef typename rtree_type::box_type box_type;
+ typedef typename rtree_type::allocators_type allocators_type;
+
+ if ( !tree.empty() )
+ {
+ glColor3f(0.75f, 0.75f, 0.75f);
+ detail::rtree::visitors::detail::gl_draw_indexable(tree.box(), 0);
+ }
+
+ detail::rtree::visitors::gl_draw<value_type, options_type, translator_type, box_type, allocators_type>
+ gl_draw_v(tree.translator(), level_first, level_last, z_coord_level_multiplier);
+
+ tree.apply_visitor(gl_draw_v);
+}
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_GL_DRAW_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,507 @@
+// Boost.Geometry Index
+//
+// R-tree inserting visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_INSERT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_INSERT_HPP
+
+#include <boost/geometry/extensions/index/algorithms/content.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace detail {
+
+// Default choose_next_node
+template <typename Value, typename Options, typename Box, typename Allocators, typename ChooseNextNodeTag>
+class choose_next_node;
+
+template <typename Value, typename Options, typename Box, typename Allocators>
+class choose_next_node<Value, Options, Box, Allocators, choose_by_content_diff_tag>
+{
+public:
+ 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,
+ parameters_type const& /*parameters*/,
+ size_t /*node_relative_level*/)
+ {
+ children_type & children = rtree::elements(n);
+
+ BOOST_GEOMETRY_INDEX_ASSERT(!children.empty(), "can't choose the next node if children are empty");
+
+ size_t children_count = children.size();
+
+ // choose index with smallest content change or smallest content
+ size_t choosen_index = 0;
+ content_type smallest_content_diff = (std::numeric_limits<content_type>::max)();
+ content_type smallest_content = (std::numeric_limits<content_type>::max)();
+
+ // caculate areas and areas of all nodes' boxes
+ for ( size_t i = 0 ; i < children_count ; ++i )
+ {
+ typedef typename children_type::value_type child_type;
+ child_type const& ch_i = children[i];
+
+ // expanded child node's box
+ Box box_exp(ch_i.first);
+ geometry::expand(box_exp, indexable);
+
+ // areas difference
+ content_type content = index::content(box_exp);
+ content_type content_diff = content - index::content(ch_i.first);
+
+ // update the result
+ if ( content_diff < smallest_content_diff ||
+ ( content_diff == smallest_content_diff && content < smallest_content ) )
+ {
+ smallest_content_diff = content_diff;
+ smallest_content = content;
+ choosen_index = i;
+ }
+ }
+
+ return choosen_index;
+ }
+};
+
+// ----------------------------------------------------------------------- //
+
+// Not implemented here
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators, typename RedistributeTag>
+struct redistribute_elements
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_REDISTRIBUTE_TAG_TYPE,
+ (redistribute_elements));
+};
+
+// ----------------------------------------------------------------------- //
+
+// Split algorithm
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators, typename SplitTag>
+class split
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_SPLIT_TAG_TYPE,
+ (split));
+};
+
+// Default split algorithm
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class split<Value, Options, Translator, Box, Allocators, split_default_tag>
+{
+protected:
+ 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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+public:
+ typedef index::detail::static_vector<std::pair<Box, node*>, 1> nodes_container_type;
+
+ template <typename Node>
+ static inline void apply(nodes_container_type & additional_nodes,
+ Node & n,
+ Box & n_box,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ {
+ // TODO - consider creating nodes always with sufficient memory allocated
+
+ // create additional node, use auto ptr for automatic destruction on exception
+ node_auto_ptr second_node(rtree::create_node<Allocators, Node>::apply(allocators), allocators); // MAY THROW, STRONG (N: alloc)
+ // create reference to the newly created node
+ Node & n2 = rtree::get<Node>(*second_node);
+
+ // NOTE: thread-safety
+ // After throwing an exception by redistribute_elements the original node may be not changed or
+ // both nodes may be empty. In both cases the tree won't be valid r-tree.
+ // The alternative is to create 2 (or more) additional nodes here and store backup info
+ // in the original node, then, if exception was thrown, the node would always have more than max
+ // elements.
+ // The alternative is to use moving semantics in the implementations of redistribute_elements,
+ // it will be possible to throw from boost::move() in the case of e.g. static size nodes.
+
+ // redistribute elements
+ Box box2;
+ redistribute_elements<
+ Value,
+ Options,
+ Translator,
+ Box,
+ Allocators,
+ typename Options::redistribute_tag
+ >::apply(n, n2, n_box, box2, parameters, translator, allocators); // MAY THROW (V, E: alloc, copy, copy)
+
+ // check numbers of 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.get_min_elements() <= rtree::elements(n2).size() &&
+ rtree::elements(n2).size() <= parameters.get_max_elements(),
+ "unexpected number of elements");
+
+ // return the list of newly created nodes (this algorithm returns one)
+ additional_nodes.push_back(std::make_pair(box2, second_node.get())); // MAY THROW, STRONG (alloc, copy)
+
+ // release the ptr
+ second_node.release();
+ }
+};
+
+// ----------------------------------------------------------------------- //
+
+template <typename InternalNode>
+struct insert_traverse_data
+{
+ typedef typename rtree::elements_type<InternalNode>::type elements_type;
+ typedef typename elements_type::value_type element_type;
+
+ insert_traverse_data()
+ : parent(0), current_child_index(0), current_level(0)
+ {}
+
+ void move_to_next_level(InternalNode * new_parent, size_t new_child_index)
+ {
+ parent = new_parent;
+ current_child_index = new_child_index;
+ ++current_level;
+ }
+
+ bool current_is_root() const
+ {
+ return 0 == parent;
+ }
+
+ elements_type & parent_elements() const
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(parent, "null pointer");
+ return rtree::elements(*parent);
+ }
+
+ element_type & current_element() const
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(parent, "null pointer");
+ return rtree::elements(*parent)[current_child_index];
+ }
+
+ InternalNode * parent;
+ size_t current_child_index;
+ size_t current_level;
+};
+
+// Default insert visitor
+template <typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class insert
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
+ , index::detail::nonassignable
+{
+protected:
+ 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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+ inline insert(node* & root,
+ size_t & leafs_level,
+ Element const& element,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level = 0
+ )
+ : m_element(element)
+ , m_parameters(parameters)
+ , m_translator(translator)
+ , m_relative_level(relative_level)
+ , m_level(leafs_level - relative_level)
+ , m_root_node(root)
+ , m_leafs_level(leafs_level)
+ , m_traverse_data()
+ , m_allocators(allocators)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(m_relative_level <= leafs_level, "unexpected level value");
+ BOOST_GEOMETRY_INDEX_ASSERT(m_level <= m_leafs_level, "unexpected level value");
+ BOOST_GEOMETRY_INDEX_ASSERT(0 != m_root_node, "there is no root node");
+ // TODO
+ // assert - check if Box is correct
+ }
+
+ template <typename Visitor>
+ inline void traverse(Visitor & visitor, internal_node & n)
+ {
+ // 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_translator), m_parameters, m_leafs_level - m_traverse_data.current_level);
+
+ // expand the node to contain value
+ geometry::expand(
+ rtree::elements(n)[choosen_node_index].first,
+ rtree::element_indexable(m_element, m_translator));
+
+ // next traversing step
+ traverse_apply_visitor(visitor, n, choosen_node_index); // MAY THROW (V, E: alloc, copy, N:alloc)
+ }
+
+ // TODO: awulkiew - change post_traverse name to handle_overflow or overflow_treatment?
+
+ template <typename Node>
+ inline void post_traverse(Node &n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(m_traverse_data.current_is_root() ||
+ &n == rtree::get<Node>(m_traverse_data.current_element().second),
+ "if node isn't the root current_child_index should be valid");
+
+ // handle overflow
+ if ( m_parameters.get_max_elements() < rtree::elements(n).size() )
+ {
+ split(n); // MAY THROW (V, E: alloc, copy, N:alloc)
+ }
+ }
+
+ template <typename Visitor>
+ inline void traverse_apply_visitor(Visitor & visitor, internal_node &n, size_t choosen_node_index)
+ {
+ // save previous traverse inputs and set new ones
+ insert_traverse_data<internal_node> backup_traverse_data = m_traverse_data;
+
+ // calculate new traverse inputs
+ m_traverse_data.move_to_next_level(&n, choosen_node_index);
+
+ // next traversing step
+ rtree::apply_visitor(visitor, *rtree::elements(n)[choosen_node_index].second); // MAY THROW (V, E: alloc, copy, N:alloc)
+
+ // restore previous traverse inputs
+ m_traverse_data = backup_traverse_data;
+ }
+
+ // TODO: consider - split result returned as OutIter is faster than reference to the container. Why?
+
+ template <typename Node>
+ inline void split(Node & n) const
+ {
+ typedef detail::split<Value, Options, Translator, Box, Allocators, typename Options::split_tag> split_algo;
+
+ typename split_algo::nodes_container_type additional_nodes;
+ Box n_box;
+
+ split_algo::apply(additional_nodes, n, n_box, m_parameters, m_translator, m_allocators); // MAY THROW (V, E: alloc, copy, N:alloc)
+
+ BOOST_GEOMETRY_INDEX_ASSERT(additional_nodes.size() == 1, "unexpected number of additional nodes");
+
+ // TODO add all additional nodes
+ // For kmeans algorithm:
+ // elements number may be greater than node max elements count
+ // split and reinsert must take node with some elements count
+ // and container of additional elements (std::pair<Box, node*>s or Values)
+ // and translator + allocators
+ // where node_elements_count + additional_elements > node_max_elements_count
+ // What with elements other than std::pair<Box, node*> ?
+ // Implement template <node_tag> struct node_element_type or something like that
+
+ // for exception safety
+ node_auto_ptr additional_node_ptr(additional_nodes[0].second, m_allocators);
+
+ // node is not the root - just add the new node
+ if ( !m_traverse_data.current_is_root() )
+ {
+ // update old node's box
+ m_traverse_data.current_element().first = n_box;
+ // add new node to parent's children
+ m_traverse_data.parent_elements().push_back(additional_nodes[0]); // MAY THROW, STRONG (V, E: alloc, copy)
+ }
+ // node is the root - add level
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<Node>(m_root_node), "node should be the root");
+
+ // create new root and add nodes
+ node_auto_ptr new_root(rtree::create_node<Allocators, internal_node>::apply(m_allocators), m_allocators); // MAY THROW, STRONG (N:alloc)
+
+ try {
+ rtree::elements(rtree::get<internal_node>(*new_root)).push_back(std::make_pair(n_box, m_root_node)); // MAY THROW, STRONG (E:alloc, copy)
+ rtree::elements(rtree::get<internal_node>(*new_root)).push_back(additional_nodes[0]); // MAY THROW, STRONG (E:alloc, copy)
+ } catch (...) {
+ // clear new root to not delete in the ~node_auto_ptr() potentially stored old root node
+ rtree::elements(rtree::get<internal_node>(*new_root)).clear();
+ throw; // RETHROW
+ }
+
+ m_root_node = new_root.get();
+ ++m_leafs_level;
+
+ new_root.release();
+ }
+
+ additional_node_ptr.release();
+ }
+
+ // TODO: awulkiew - implement dispatchable split::apply to enable additional nodes creation
+
+ Element const& m_element;
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
+ const size_t m_relative_level;
+ const size_t m_level;
+
+ node* & m_root_node;
+ size_t & m_leafs_level;
+
+ // traversing input parameters
+ insert_traverse_data<internal_node> m_traverse_data;
+
+ Allocators & m_allocators;
+};
+
+} // namespace detail
+
+// Insert visitor forward declaration
+template <typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators, typename InsertTag>
+class insert;
+
+// Default insert visitor used for nodes elements
+// After passing the Element to insert visitor the Element is managed by the tree
+// I.e. one should not delete the node passed to the insert visitor after exception is thrown
+// because this visitor may delete it
+template <typename Element, typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class insert<Element, Value, Options, Translator, Box, Allocators, insert_default_tag>
+ : public detail::insert<Element, Value, Options, Translator, Box, Allocators>
+{
+public:
+ typedef detail::insert<Element, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ 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 & element,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level = 0
+ )
+ : base(root, leafs_level, element, parameters, translator, allocators, relative_level)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_leafs_level, "unexpected level");
+
+ if ( base::m_traverse_data.current_level < base::m_level )
+ {
+ // next traversing step
+ base::traverse(*this, n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level, "unexpected level");
+
+ try
+ {
+ // push new child node
+ rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (E: alloc, copy)
+ }
+ catch(...)
+ {
+ // if the insert fails above, the element won't be stored in the tree
+
+ rtree::visitors::destroy<Value, Options, Translator, Box, Allocators> del_v(base::m_element.second, base::m_allocators);
+ rtree::apply_visitor(del_v, *base::m_element.second);
+
+ throw; // RETHROW
+ }
+ }
+
+ base::post_traverse(n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+
+ inline void operator()(leaf &)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(false, "this visitor can't be used for a leaf");
+ }
+};
+
+// Default insert visitor specialized for Values elements
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class insert<Value, Value, Options, Translator, Box, Allocators, insert_default_tag>
+ : public detail::insert<Value, Value, Options, Translator, Box, Allocators>
+{
+public:
+ typedef detail::insert<Value, Value, Options, Translator, Box, Allocators> base;
+ typedef typename base::node node;
+ 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& value,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators,
+ size_t relative_level = 0
+ )
+ : base(root, leafs_level, value, parameters, translator, allocators, relative_level)
+ {}
+
+ inline void operator()(internal_node & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_leafs_level, "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level < base::m_level, "unexpected level");
+
+ // next traversing step
+ base::traverse(*this, n); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ base::post_traverse(n); // MAY THROW (E: alloc, copy, N: alloc)
+ }
+
+ inline void operator()(leaf & n)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_traverse_data.current_level == base::m_leafs_level, "unexpected level");
+ BOOST_GEOMETRY_INDEX_ASSERT(base::m_level == base::m_traverse_data.current_level ||
+ base::m_level == (std::numeric_limits<size_t>::max)(), "unexpected level");
+
+ rtree::elements(n).push_back(base::m_element); // MAY THROW, STRONG (V: alloc, copy)
+
+ base::post_traverse(n); // MAY THROW (V: alloc, copy, N: alloc)
+ }
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_INSERT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,43 @@
+// Boost.Geometry Index
+//
+// R-tree leaf node checking visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_IS_LEAF_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_IS_LEAF_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Value, typename Options, typename Box, typename Allocators>
+struct is_leaf : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+{
+ 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;
+
+ inline void operator()(internal_node const&)
+ {
+ result = false;
+ }
+
+ inline void operator()(leaf const&)
+ {
+ result = true;
+ }
+
+ bool result;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_IS_LEAF_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/nearest_query.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/nearest_query.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,341 @@
+// Boost.Geometry Index
+//
+// R-tree k nearest neighbour query visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP
+
+#include <boost/geometry/extensions/index/detail/distance_predicates.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+#include <boost/geometry/extensions/index/translator/translator.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+// TODO: awulkiew - maby it's a good idea to check if curr_mindist < comp_mindist and then check predicates
+// in store() or break store to 2 functions e.g. should_store() and store()
+// - well not with this algorithm of storing k-th neighbor
+
+template <typename Value, typename Translator, typename Point>
+struct nearest_query_result_one
+{
+public:
+ typedef typename geometry::default_distance_result<
+ Point,
+ typename translator::indexable_type<Translator>::type
+ >::type distance_type;
+
+ inline nearest_query_result_one(Value & value)
+ : m_value(value)
+ , m_comp_dist((std::numeric_limits<distance_type>::max)())
+ {}
+
+ inline void store(Value const& val, distance_type const& curr_comp_dist)
+ {
+ if ( curr_comp_dist < m_comp_dist )
+ {
+ m_comp_dist = curr_comp_dist;
+ m_value = val;
+ }
+ }
+
+ inline bool is_comparable_distance_valid() const
+ {
+ return m_comp_dist < (std::numeric_limits<distance_type>::max)();
+ }
+
+ inline distance_type comparable_distance() const
+ {
+ return m_comp_dist;
+ }
+
+ inline size_t finish()
+ {
+ return is_comparable_distance_valid() ? 1 : 0;
+ }
+
+private:
+ Value & m_value;
+ distance_type m_comp_dist;
+};
+
+template <typename Value, typename Translator, typename Point, typename OutIt>
+struct nearest_query_result_k
+{
+public:
+ typedef typename geometry::default_distance_result<
+ Point,
+ typename translator::indexable_type<Translator>::type
+ >::type distance_type;
+
+ inline explicit nearest_query_result_k(size_t k, OutIt out_it)
+ : m_count(k), m_out_it(out_it)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_count, "Number of neighbors should be greater than 0");
+
+ m_neighbors.reserve(m_count);
+ }
+
+ inline void store(Value const& val, distance_type const& curr_comp_dist)
+ {
+ if ( m_neighbors.size() < m_count )
+ {
+ m_neighbors.push_back(std::make_pair(curr_comp_dist, val));
+
+ if ( m_neighbors.size() == m_count )
+ std::make_heap(m_neighbors.begin(), m_neighbors.end(), neighbors_less);
+ }
+ else
+ {
+ if ( curr_comp_dist < m_neighbors.front().first )
+ {
+ std::pop_heap(m_neighbors.begin(), m_neighbors.end(), neighbors_less);
+ m_neighbors.back().first = curr_comp_dist;
+ m_neighbors.back().second = val;
+ std::push_heap(m_neighbors.begin(), m_neighbors.end(), neighbors_less);
+ }
+ }
+ }
+
+ inline bool is_comparable_distance_valid() const
+ {
+ return m_neighbors.size() == m_count;
+ }
+
+ inline distance_type comparable_distance() const
+ {
+ // smallest distance is in the first neighbor only
+ // if there is at least m_count values found
+ // this is just for safety reasons since is_comparable_distance_valid() is checked earlier
+ // TODO - may be replaced by ASSERT
+ return m_neighbors.size() < m_count
+ ? (std::numeric_limits<distance_type>::max)()
+ : m_neighbors.front().first;
+ }
+
+ inline size_t finish()
+ {
+ typedef typename std::vector< std::pair<distance_type, Value> >::const_iterator neighbors_iterator;
+ for ( neighbors_iterator it = m_neighbors.begin() ; it != m_neighbors.end() ; ++it, ++m_out_it )
+ *m_out_it = it->second;
+
+ return m_neighbors.size();
+ }
+
+private:
+ inline static bool neighbors_less(
+ std::pair<distance_type, Value> const& p1,
+ std::pair<distance_type, Value> const& p2)
+ {
+ return p1.first < p2.first;
+ }
+
+ size_t m_count;
+ OutIt m_out_it;
+
+ std::vector< std::pair<distance_type, Value> > m_neighbors;
+ distance_type m_biggest_comp_dist;
+};
+
+// TODO: awulkiew - add additional pruning before adding nodes to the ABL
+
+template <
+ typename Value,
+ typename Options,
+ typename Translator,
+ typename Box,
+ typename Allocators,
+ typename DistancesPredicates,
+ typename Predicates,
+ typename Result
+>
+class nearest_query
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::nonassignable
+{
+public:
+ 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, index::detail::envelope_tag> node_distances_calc;
+ typedef typename node_distances_calc::result_type node_distances_type;
+ typedef index::detail::distances_predicates_check<DistancesPredicates, Box, index::detail::envelope_tag> node_distances_predicates_check;
+
+ typedef index::detail::distances_calc<
+ DistancesPredicates,
+ typename translator::indexable_type<Translator>::type,
+ index::detail::value_tag
+ > value_distances_calc;
+ typedef typename value_distances_calc::result_type value_distances_type;
+ typedef index::detail::distances_predicates_check<
+ DistancesPredicates,
+ typename translator::indexable_type<Translator>::type,
+ index::detail::value_tag
+ > value_distances_predicates_check;
+
+ inline nearest_query(parameters_type const& parameters, Translator const& translator, DistancesPredicates const& dist_pred, Predicates const& pred, Result & r)
+ : m_parameters(parameters), m_translator(translator)
+ , m_dist_pred(dist_pred), m_pred(pred)
+ , m_result(r)
+ {}
+
+ //TODO: awulkiew - consider this approach: store one, global vector of active branches, add branches only if mindist is ok
+
+ inline void operator()(internal_node const& n)
+ {
+ 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
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if current node meets predicates
+ // 0 - dummy value
+ if ( index::detail::predicates_check<index::detail::envelope_tag>(m_pred, 0, it->first) )
+ {
+ // calculate node's distance(s) for distance predicate
+ node_distances_type node_dist_data = node_distances_calc::apply(m_dist_pred, it->first);
+
+ // TODO: awulkiew - consider at first calculating near distance only,
+ // comparing it with m_result.comparable_distance if it's valid,
+ // after that calculate the rest of distances and check predicates
+
+ // if current node is further than found neighbors - don't analyze it
+ if ( m_result.is_comparable_distance_valid() &&
+ is_node_prunable(m_result.comparable_distance(), node_dist_data) )
+ {
+ continue;
+ }
+
+ // if current node distance(s) meets distance predicate
+ if ( node_distances_predicates_check::apply(m_dist_pred, node_dist_data) )
+ {
+ // add current node's data into the list
+ active_branch_list.push_back( std::make_pair(node_dist_data, it->second) );
+ }
+ }
+ }
+
+ // if there aren't any nodes in ABL - return
+ if ( active_branch_list.empty() )
+ return;
+
+ // sort array
+ std::sort(active_branch_list.begin(), active_branch_list.end(), abl_less);
+
+ // recursively visit nodes
+ for ( size_t i = 0 ;; ++i )
+ {
+ // prune nodes
+ prune_nodes(active_branch_list);
+
+ if ( active_branch_list.size() <= i )
+ break;
+
+ rtree::apply_visitor(*this, *active_branch_list[i].second);
+ }
+ }
+
+ inline void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // search leaf for closest value meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if value meets predicates
+ if ( index::detail::predicates_check<index::detail::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_translator(*it));
+
+ // TODO: awulkiew - consider at first calculating point relation distance only,
+ // comparing it with m_result.comparable_distance if it's valid,
+ // after that calculate the rest of distances and check predicates
+
+ // if distance meets distance predicate
+ if ( value_distances_predicates_check::apply(m_dist_pred, distances) )
+ {
+ typedef typename index::detail::point_relation<DistancesPredicates>::type point_relation_type;
+ typedef typename index::detail::relation<point_relation_type>::tag point_relation_tag;
+
+ // store value
+ m_result.store(
+ *it,
+ index::detail::cdist_value<value_distances_type>
+ ::template get<point_relation_tag>(distances)
+ );
+ }
+ }
+ }
+ }
+
+private:
+ template <typename ActiveBranchList>
+ inline void prune_nodes(ActiveBranchList & abl) const
+ {
+ // if some value were found
+ if ( m_result.is_comparable_distance_valid() )
+ {
+ // prune if box's mindist is further than value's mindist
+ while ( !abl.empty() &&
+ is_node_prunable(m_result.comparable_distance(), abl.back().first) )
+ {
+ abl.pop_back();
+ }
+ }
+ }
+
+ static inline bool abl_less(
+ std::pair<node_distances_type, const node *> const& p1,
+ std::pair<node_distances_type, const node *> const& p2)
+ {
+ return index::detail::cdist_value<node_distances_type>
+ ::template get<index::detail::to_nearest_tag>(p1.first)
+ < index::detail::cdist_value<node_distances_type>
+ ::template get<index::detail::to_nearest_tag>(p2.first);
+ }
+
+ template <typename Distance>
+ static inline bool is_node_prunable(Distance const& smallest_dist, node_distances_type const& d)
+ {
+ return smallest_dist
+ < index::detail::cdist_value<node_distances_type>
+ ::template get<index::detail::to_nearest_tag>(d);
+ }
+
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
+ DistancesPredicates const& m_dist_pred;
+ Predicates const& m_pred;
+
+ Result & m_result;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_NEAREST_QUERY_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/print.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/print.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,197 @@
+// Boost.Geometry Index
+//
+// R-tree ostreaming visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_PRINT_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_PRINT_HPP
+
+#include <iostream>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+namespace dispatch {
+
+template <typename Point, size_t Dimension>
+struct print_point
+{
+ BOOST_STATIC_ASSERT(0 < Dimension);
+
+ static inline void apply(std::ostream & os, Point const& p)
+ {
+ print_point<Point, Dimension - 1>::apply(os, p);
+
+ os << ", " << geometry::get<Dimension - 1>(p);
+ }
+};
+
+template <typename Point>
+struct print_point<Point, 1>
+{
+ static inline void apply(std::ostream & os, Point const& p)
+ {
+ os << geometry::get<0>(p);
+ }
+};
+
+template <typename Box, size_t Corner, size_t Dimension>
+struct print_corner
+{
+ BOOST_STATIC_ASSERT(0 < Dimension);
+
+ static inline void apply(std::ostream & os, Box const& b)
+ {
+ print_corner<Box, Corner, Dimension - 1>::apply(os, b);
+
+ os << ", " << geometry::get<Corner, Dimension - 1>(b);
+ }
+};
+
+template <typename Box, size_t Corner>
+struct print_corner<Box, Corner, 1>
+{
+ static inline void apply(std::ostream & os, Box const& b)
+ {
+ os << geometry::get<Corner, 0>(b);
+ }
+};
+
+template <typename Indexable, typename Tag>
+struct print_indexable
+{
+};
+
+template <typename Indexable>
+struct print_indexable<Indexable, box_tag>
+{
+ static const size_t dimension = index::traits::dimension<Indexable>::value;
+
+ static inline void apply(std::ostream &os, Indexable const& i)
+ {
+ os << '(';
+ print_corner<Indexable, min_corner, dimension>::apply(os, i);
+ os << ")x(";
+ print_corner<Indexable, max_corner, dimension>::apply(os, i);
+ os << ')';
+ }
+};
+
+template <typename Indexable>
+struct print_indexable<Indexable, point_tag>
+{
+ static const size_t dimension = index::traits::dimension<Indexable>::value;
+
+ static inline void apply(std::ostream &os, Indexable const& i)
+ {
+ os << '(';
+ print_point<Indexable, dimension>::apply(os, i);
+ os << ')';
+ }
+};
+
+} // namespace dispatch
+
+namespace detail {
+
+template <typename Indexable>
+inline void print_indexable(std::ostream & os, Indexable const& i)
+{
+ dispatch::print_indexable<
+ Indexable,
+ typename geometry::traits::tag<Indexable>::type
+ >::apply(os, i);
+}
+
+} // namespace detail
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+struct print : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+{
+ 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;
+
+ inline print(std::ostream & o, Translator const& t)
+ : os(o), tr(t), level(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ spaces(level) << "INTERNAL NODE - L:" << level << " Ch:" << elements.size() << " @:" << &n << '\n';
+
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ spaces(level);
+ detail::print_indexable(os, it->first);
+ os << " ->" << it->second << '\n';
+ }
+
+ size_t level_backup = level;
+ ++level;
+
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ rtree::apply_visitor(*this, *it->second);
+ }
+
+ level = level_backup;
+ }
+
+ inline void operator()(leaf const& n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ spaces(level) << "LEAF - L:" << level << " V:" << elements.size() << " @:" << &n << '\n';
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ spaces(level);
+ detail::print_indexable(os, tr(*it));
+ os << '\n';
+ }
+ }
+
+ inline std::ostream & spaces(size_t level)
+ {
+ for ( size_t i = 0 ; i < 2 * level ; ++i )
+ os << ' ';
+ return os;
+ }
+
+ std::ostream & os;
+ Translator const& tr;
+
+ size_t level;
+};
+
+}}} // namespace detail::rtree::visitors
+
+template <typename Value, typename Options, typename Translator, typename Allocator>
+std::ostream & operator<<(std::ostream & os, rtree<Value, Options, Translator, Allocator> const& tree)
+{
+ typedef rtree<Value, Options, Translator, Allocator> rtree_type;
+ typedef typename rtree_type::value_type value_type;
+ typedef typename rtree_type::options_type options_type;
+ typedef typename rtree_type::translator_type translator_type;
+ typedef typename rtree_type::box_type box_type;
+ typedef typename rtree_type::allocators_type allocators_type;
+ detail::rtree::visitors::print<value_type, options_type, translator_type, box_type, allocators_type> print_v(os, tree.translator());
+ tree.apply_visitor(print_v);
+ return os;
+}
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_PRINT_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/remove.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/remove.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,331 @@
+// Boost.Geometry Index
+//
+// R-tree removing visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_REMOVE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_REMOVE_HPP
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/visitors/is_leaf.hpp>
+
+#include <boost/geometry/algorithms/covered_by.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+// Default remove algorithm
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators>
+class remove
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, false>::type
+ , index::detail::nonassignable
+{
+ 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 rtree::node_auto_ptr<Value, Options, Translator, Box, Allocators> node_auto_ptr;
+
+public:
+ inline remove(node* & root,
+ size_t & leafs_level,
+ Box & root_box,
+ Value const& value,
+ parameters_type const& parameters,
+ Translator const& translator,
+ Allocators & allocators)
+ : m_value(value)
+ , m_parameters(parameters)
+ , m_translator(translator)
+ , m_allocators(allocators)
+ , m_root_node(root)
+ , m_root_box(root_box)
+ , m_leafs_level(leafs_level)
+ , m_is_value_removed(false)
+ , m_parent(0)
+ , m_current_child_index(0)
+ , m_current_level(0)
+ , m_is_underflow(false)
+ {
+ // TODO
+ // assert - check if Value/Box is correct
+ }
+
+ inline void operator()(internal_node & n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type children_type;
+ children_type & children = rtree::elements(n);
+
+ // traverse children which boxes intersects value's box
+ size_t child_node_index = 0;
+ for ( ; child_node_index < children.size() ; ++child_node_index )
+ {
+ if ( geometry::covered_by(m_translator(m_value), children[child_node_index].first) )
+ {
+ // next traversing step
+ traverse_apply_visitor(n, child_node_index); // MAY THROW
+
+ if ( m_is_value_removed )
+ break;
+ }
+ }
+
+ // value was found and removed
+ if ( m_is_value_removed )
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ typedef typename elements_type::iterator element_iterator;
+ elements_type & elements = rtree::elements(n);
+
+ // underflow occured - child node should be removed
+ if ( m_is_underflow )
+ {
+ element_iterator underfl_el_it = elements.begin() + child_node_index;
+ size_t relative_level = m_leafs_level - m_current_level;
+
+ // move node to the container - store node's relative level as well and return new underflow state
+ m_is_underflow = store_underflowed_node(elements, underfl_el_it, relative_level); // MAY THROW (E: alloc, copy)
+ }
+
+ // n is not root - adjust aabb
+ if ( 0 != m_parent )
+ {
+ // 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
+ 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_translator);
+ }
+ // n is root node
+ else
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(&n == rtree::get<internal_node>(m_root_node), "node must be the root");
+
+ // assign new root's box
+ assign_root_box(elements);
+
+ // reinsert elements from removed nodes (underflows)
+ reinsert_removed_nodes_elements(); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ // shorten the tree
+ if ( rtree::elements(n).size() == 1 )
+ {
+ node * root_to_destroy = m_root_node;
+ m_root_node = rtree::elements(n)[0].second;
+ --m_leafs_level;
+
+ rtree::destroy_node<Allocators, internal_node>::apply(m_allocators, root_to_destroy);
+ }
+ }
+ }
+ }
+
+ inline void operator()(leaf & n)
+ {
+ typedef typename rtree::elements_type<leaf>::type elements_type;
+ elements_type & elements = rtree::elements(n);
+
+ // find value and remove it
+ for ( typename elements_type::iterator it = elements.begin() ; it != elements.end() ; ++it )
+ {
+ if ( m_translator.equals(*it, m_value) )
+ {
+ rtree::copy_from_back(elements, it); // MAY THROW (V: copy)
+ elements.pop_back();
+ m_is_value_removed = true;
+ break;
+ }
+ }
+
+ // if value was removed
+ if ( m_is_value_removed )
+ {
+ // calc underflow
+ 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_translator);
+ }
+ else
+ {
+ assign_root_box(elements);
+ }
+ }
+ }
+
+ bool is_value_removed() const
+ {
+ return m_is_value_removed;
+ }
+
+private:
+
+ typedef std::vector< std::pair<size_t, node*> > UnderflowNodes;
+
+ void traverse_apply_visitor(internal_node &n, size_t choosen_node_index)
+ {
+ // save previous traverse inputs and set new ones
+ internal_node * parent_bckup = m_parent;
+ size_t current_child_index_bckup = m_current_child_index;
+ size_t current_level_bckup = m_current_level;
+
+ m_parent = &n;
+ m_current_child_index = choosen_node_index;
+ ++m_current_level;
+
+ // next traversing step
+ rtree::apply_visitor(*this, *rtree::elements(n)[choosen_node_index].second); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ // restore previous traverse inputs
+ m_parent = parent_bckup;
+ m_current_child_index = current_child_index_bckup;
+ m_current_level = current_level_bckup;
+ }
+
+ bool store_underflowed_node(
+ typename rtree::elements_type<internal_node>::type & elements,
+ typename rtree::elements_type<internal_node>::type::iterator underfl_el_it,
+ size_t relative_level)
+ {
+ // move node to the container - store node's relative level as well
+ m_underflowed_nodes.push_back(std::make_pair(relative_level, underfl_el_it->second)); // MAY THROW (E: alloc, copy)
+
+ try
+ {
+ rtree::copy_from_back(elements, underfl_el_it); // MAY THROW (E: copy)
+ elements.pop_back();
+ }
+ catch(...)
+ {
+ m_underflowed_nodes.pop_back();
+ throw; // RETHROW
+ }
+
+ // calc underflow
+ return elements.size() < m_parameters.get_min_elements();
+ }
+
+ void reinsert_removed_nodes_elements()
+ {
+ typename UnderflowNodes::reverse_iterator it = m_underflowed_nodes.rbegin();
+
+ try
+ {
+ // reinsert elements from removed nodes
+ // begin with levels closer to the root
+ for ( ; it != m_underflowed_nodes.rend() ; ++it )
+ {
+ is_leaf<Value, Options, Box, Allocators> ilv;
+ rtree::apply_visitor(ilv, *it->second);
+ if ( ilv.result )
+ {
+ reinsert_node_elements(rtree::get<leaf>(*it->second), it->first); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ rtree::destroy_node<Allocators, leaf>::apply(m_allocators, it->second);
+ }
+ else
+ {
+ reinsert_node_elements(rtree::get<internal_node>(*it->second), it->first); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ rtree::destroy_node<Allocators, internal_node>::apply(m_allocators, it->second);
+ }
+ }
+
+ //m_underflowed_nodes.clear();
+ }
+ catch(...)
+ {
+ // destroy current and remaining nodes
+ for ( ; it != m_underflowed_nodes.rend() ; ++it )
+ {
+ node_auto_ptr dummy(it->second, m_allocators);
+ }
+
+ //m_underflowed_nodes.clear();
+
+ throw; // RETHROW
+ }
+ }
+
+ template <typename Node>
+ void reinsert_node_elements(Node &n, size_t node_relative_level)
+ {
+ typedef typename rtree::elements_type<Node>::type elements_type;
+ elements_type & elements = rtree::elements(n);
+
+ typename elements_type::iterator it = elements.begin();
+ try
+ {
+ for ( ; it != elements.end() ; ++it )
+ {
+ visitors::insert<
+ typename elements_type::value_type,
+ Value, Options, Translator, Box, Allocators,
+ typename Options::insert_tag
+ > insert_v(
+ m_root_node, m_leafs_level, *it,
+ m_parameters, m_translator, m_allocators,
+ node_relative_level - 1);
+
+ rtree::apply_visitor(insert_v, *m_root_node); // MAY THROW (V, E: alloc, copy, N: alloc)
+ }
+ }
+ catch(...)
+ {
+ ++it;
+ rtree::destroy_elements<Value, Options, Translator, Box, Allocators>
+ ::apply(it, elements.end(), m_allocators);
+ elements.clear();
+ throw; // RETHROW
+ }
+ }
+
+ template <typename Elements>
+ void assign_root_box(Elements const& elements)
+ {
+ if ( elements.empty() )
+ geometry::assign_inverse(m_root_box);
+ else
+ m_root_box = rtree::elements_box<Box>(elements.begin(), elements.end(), m_translator);
+ }
+
+ Value const& m_value;
+ parameters_type const& m_parameters;
+ Translator const& m_translator;
+ Allocators & m_allocators;
+
+ node* & m_root_node;
+ Box & m_root_box;
+ size_t & m_leafs_level;
+
+ bool m_is_value_removed;
+ UnderflowNodes m_underflowed_nodes;
+
+ // traversing input parameters
+ internal_node *m_parent;
+ size_t m_current_child_index;
+ size_t m_current_level;
+
+ // traversing output parameters
+ bool m_is_underflow;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_REMOVE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/spatial_query.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/rtree/visitors/spatial_query.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,81 @@
+// Boost.Geometry Index
+//
+// R-tree spatial query visitor implementation
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP
+
+#include <boost/geometry/extensions/index/detail/predicates.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace visitors {
+
+template <typename Value, typename Options, typename Translator, typename Box, typename Allocators, typename Predicates, typename OutIter>
+struct spatial_query
+ : public rtree::visitor<Value, typename Options::parameters_type, Box, Allocators, typename Options::node_tag, true>::type
+ , index::detail::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;
+
+ inline spatial_query(Translator const& t, Predicates const& p, OutIter out_it)
+ : tr(t), pred(p), out_iter(out_it), found_count(0)
+ {}
+
+ inline void operator()(internal_node const& n)
+ {
+ typedef typename rtree::elements_type<internal_node>::type elements_type;
+ elements_type const& elements = rtree::elements(n);
+
+ // traverse nodes meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if node meets predicates
+ // 0 - dummy value
+ if ( index::detail::predicates_check<index::detail::envelope_tag>(pred, 0, it->first) )
+ 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);
+
+ // get all values meeting predicates
+ for (typename elements_type::const_iterator it = elements.begin();
+ it != elements.end(); ++it)
+ {
+ // if value meets predicates
+ if ( index::detail::predicates_check<index::detail::value_tag>(pred, *it, tr(*it)) )
+ {
+ out_iter = *it;
+ ++out_iter;
+
+ ++found_count;
+ }
+ }
+ }
+
+ Translator const& tr;
+ Predicates const& pred;
+ OutIter out_iter;
+ size_t found_count;
+};
+
+}}} // namespace detail::rtree::visitors
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_VISITORS_SPATIAL_QUERY_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/static_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/static_vector.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,806 @@
+// Boost.Geometry Index
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP
+
+#include <cstddef>
+#include <stdexcept>
+
+#include <boost/aligned_storage.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+
+#include <boost/geometry/extensions/index/detail/assert.hpp>
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+template <typename Value, size_t Capacity>
+class static_vector
+{
+ BOOST_MPL_ASSERT_MSG(
+ (0 < Capacity),
+ INVALID_CAPACITY,
+ (static_vector));
+
+public:
+ typedef Value value_type;
+ typedef std::size_t size_type;
+ typedef Value& reference;
+ typedef Value const& const_reference;
+ typedef Value * pointer;
+ typedef const Value* const_pointer;
+ typedef Value* iterator;
+ typedef const Value * const_iterator;
+ typedef boost::reverse_iterator<iterator> reverse_iterator;
+ typedef boost::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef typename boost::iterator_difference<iterator>::type difference_type;
+
+ // nothrow
+ static_vector()
+ : m_size(0)
+ {}
+
+ // strong
+ explicit static_vector(size_type count)
+ : m_size(0)
+ {
+ resize(count); // may throw
+ }
+
+ // strong
+ static_vector(size_type count, value_type const& value)
+ : m_size(0)
+ {
+ resize(count, value); // may throw
+ }
+
+ // strong
+ static_vector(static_vector const& other)
+ : m_size(other.m_size)
+ {
+ this->uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw
+ }
+
+ // strong
+ template <size_t C>
+ static_vector(static_vector<value_type, C> const& other)
+ : m_size(other.m_size)
+ {
+ check_capacity(other.m_size);
+
+ this->uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw
+ }
+
+ // strong
+ template <typename Iterator>
+ static_vector(Iterator first, Iterator last)
+ : m_size(0)
+ {
+ assign(first, last); // may throw
+ }
+
+ // basic
+ static_vector & operator=(static_vector const& other)
+ {
+ assign(other.begin(), other.end()); // may throw
+
+ return *this;
+ }
+
+ // basic
+ template <size_t C>
+ static_vector & operator=(static_vector<value_type, C> const& other)
+ {
+ assign(other.begin(), other.end()); // may throw
+
+ return *this;
+ }
+
+ // nothrow
+ ~static_vector()
+ {
+ this->destroy(this->begin(), this->end());
+ }
+
+ // strong
+ void resize(size_type count)
+ {
+ if ( count < m_size )
+ {
+ this->destroy(this->begin() + count, this->end());
+ }
+ else
+ {
+ check_capacity(count);
+
+ this->construct(this->end(), this->begin() + count); // may throw
+ }
+ m_size = count; // update end
+ }
+
+ // strong
+ void resize(size_type count, value_type const& value)
+ {
+ if ( count < m_size )
+ {
+ this->destroy(this->begin() + count, this->end());
+ }
+ else
+ {
+ check_capacity(count);
+
+ std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
+ }
+ m_size = count; // update end
+ }
+
+ // nothrow
+ void reserve(size_type count)
+ {
+ check_capacity(count);
+ }
+
+ // strong
+ void push_back(value_type const& value)
+ {
+ check_capacity(m_size + 1);
+
+ this->uninitialized_fill(this->end(), value); // may throw
+ ++m_size; // update end
+ }
+
+ // nothrow
+ void pop_back()
+ {
+ check_empty();
+
+ //--m_size; // update end
+ //this->destroy(this->end());
+
+ // safer and more intuitive version
+ this->destroy(this->end() - 1);
+ --m_size; // update end
+ }
+
+ // basic
+ void insert(iterator position, value_type const& value)
+ {
+ check_iterator_end_eq(position);
+ check_capacity(m_size + 1);
+
+ if ( position == this->end() )
+ {
+ this->uninitialized_fill(position, value); // may throw
+ ++m_size; // update end
+ }
+ else
+ {
+ // TODO - should following lines check for exception and revert to the old size?
+
+ this->uninitialized_fill(this->end(), *(this->end() - 1)); // may throw
+ ++m_size; // update end
+ this->move_backward(position, this->end() - 2, this->end() - 1); // may throw
+ this->fill(position, value); // may throw
+ }
+ }
+
+ // basic
+ void insert(iterator position, size_type count, value_type const& value)
+ {
+ check_iterator_end_eq(position);
+ check_capacity(m_size + count);
+
+ if ( position == this->end() )
+ {
+ std::uninitialized_fill(position, position + count, value); // may throw
+ m_size += count; // update end
+ }
+ else
+ {
+ difference_type to_move = std::distance(position, this->end());
+
+ // TODO - should following lines check for exception and revert to the old size?
+
+ if ( count < static_cast<size_type>(to_move) )
+ {
+ this->uninitialized_copy(this->end() - count, this->end(), this->end()); // may throw
+ m_size += count; // update end
+ this->move_backward(position, position + to_move - count, this->end() - count); // may throw
+ std::fill_n(position, count, value); // may throw
+ }
+ else
+ {
+ std::uninitialized_fill(this->end(), position + count, value); // may throw
+ m_size += count - to_move; // update end
+ this->uninitialized_copy(position, position + to_move, position + count); // may throw
+ m_size += to_move; // update end
+ std::fill_n(position, to_move, value); // may throw
+ }
+ }
+ }
+
+ // basic
+ template <typename Iterator>
+ void insert(iterator position, Iterator first, Iterator last)
+ {
+ typedef typename boost::iterator_traversal<Iterator>::type traversal;
+ this->insert_dispatch(position, first, last, traversal());
+ }
+
+ // basic
+ void erase(iterator position)
+ {
+ check_iterator_end_neq(position);
+
+ this->move(position + 1, this->end(), position); // may throw
+ this->destroy(this->end() - 1);
+ --m_size;
+ }
+
+ // basic
+ void erase(iterator first, iterator last)
+ {
+ check_iterator_end_eq(first);
+ check_iterator_end_eq(last);
+
+ difference_type n = std::distance(first, last);
+ BOOST_ASSERT_MSG(0 <= n, "invalid range");
+
+ this->move(last, this->end(), first); // may throw
+ this->destroy(this->end() - n, this->end());
+ m_size -= n;
+ }
+
+ // basic
+ template <typename Iterator>
+ void assign(Iterator first, Iterator last)
+ {
+ typedef typename boost::iterator_traversal<Iterator>::type traversal;
+ this->assign_dispatch(first, last, traversal()); // may throw
+ }
+
+ // basic
+ void assign(size_type count, value_type const& value)
+ {
+ if ( count < m_size )
+ {
+ std::fill_n(this->begin(), count, value);
+ this->destroy(this->begin() + count, this->end());
+ }
+ else
+ {
+ check_capacity(count);
+
+ std::fill_n(this->begin(), m_size, value);
+ std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
+ }
+ m_size = count; // update end
+ }
+
+ // nothrow
+ void clear()
+ {
+ this->destroy(this->begin(), this->end());
+ m_size = 0; // update end
+ }
+
+ // strong
+ Value & at(size_type i)
+ {
+ if ( m_size <= i )
+ throw std::out_of_range("index out of bounds");
+ return *(this->begin() + i);
+ }
+
+ // strong
+ Value const& at(size_type i) const
+ {
+ if ( m_size <= i )
+ throw std::out_of_range("index out of bounds");
+ return *(this->begin() + i);
+ }
+
+ // nothrow
+ Value & operator[](size_type i)
+ {
+ BOOST_ASSERT_MSG(i < m_size, "index out of bounds");
+ return *(this->begin() + i);
+ }
+
+ // nothrow
+ Value const& operator[](size_type i) const
+ {
+ BOOST_ASSERT_MSG(i < m_size, "index out of bounds");
+ return *(this->begin() + i);
+ }
+
+ // nothrow
+ Value & front()
+ {
+ check_empty();
+ return *(this->begin());
+ }
+
+ // nothrow
+ Value const& front() const
+ {
+ check_empty();
+ return *(this->begin());
+ }
+
+ // nothrow
+ Value & back()
+ {
+ check_empty();
+ return *(this->end() - 1);
+ }
+
+ // nothrow
+ Value const& back() const
+ {
+ check_empty();
+ return *(this->end() - 1);
+ }
+
+ // nothrow
+ Value * data() { return this->ptr(); }
+ const Value * data() const { return this->ptr(); }
+
+ // nothrow
+ iterator begin() { return this->ptr(); }
+ const_iterator begin() const { return this->ptr(); }
+ const_iterator cbegin() const { return this->ptr(); }
+ iterator end() { return this->begin() + m_size; }
+ const_iterator end() const { return this->begin() + m_size; }
+ const_iterator cend() const { return this->cbegin() + m_size; }
+ // nothrow
+ reverse_iterator rbegin() { return reverse_iterator(this->end()); }
+ const_reverse_iterator rbegin() const { return reverse_iterator(this->end()); }
+ const_reverse_iterator crbegin() const { return reverse_iterator(this->end()); }
+ reverse_iterator rend() { return reverse_iterator(this->begin()); }
+ const_reverse_iterator rend() const { return reverse_iterator(this->begin()); }
+ const_reverse_iterator crend() const { return reverse_iterator(this->begin()); }
+
+ // nothrow
+ size_type capacity() const { return Capacity; }
+ size_type max_size() const { return Capacity; }
+ size_type size() const { return m_size; }
+ bool empty() const { return 0 == m_size; }
+
+private:
+
+ // insert
+
+ template <typename Iterator>
+ void insert_dispatch(iterator position, Iterator first, Iterator last, boost::random_access_traversal_tag const&)
+ {
+ check_iterator_end_eq(position);
+
+ difference_type count = std::distance(first, last);
+
+ check_capacity(m_size + count);
+
+ if ( position == this->end() )
+ {
+ this->uninitialized_copy(first, last, position); // may throw
+ m_size += count; // update end
+ }
+ else
+ {
+ this->insert_in_the_middle(position, first, last, count); // may throw
+ }
+ }
+
+ template <typename Iterator, typename Traversal>
+ void insert_dispatch(iterator position, Iterator first, Iterator last, Traversal const& /*not_random_access*/)
+ {
+ check_iterator_end_eq(position);
+
+ if ( position == this->end() )
+ {
+ std::pair<bool, size_type> copy_data =
+ this->uninitialized_copy_checked(first, last, position, std::distance(position, this->begin() + Capacity)); // may throw
+
+ check_capacity(copy_data.first ? m_size + copy_data.second : Capacity + 1);
+
+ m_size += copy_data.second;
+ }
+ else
+ {
+ difference_type count = std::distance(first, last);
+
+ check_capacity(m_size + count);
+
+ this->insert_in_the_middle(position, first, last, count); // may throw
+ }
+ }
+
+ template <typename Iterator>
+ void insert_in_the_middle(iterator position, Iterator first, Iterator last, difference_type count)
+ {
+ difference_type to_move = std::distance(position, this->end());
+
+ // TODO - should following lines check for exception and revert to the old size?
+
+ if ( count < to_move )
+ {
+ this->uninitialized_copy(this->end() - count, this->end(), this->end()); // may throw
+ m_size += count; // update end
+ this->move_backward(position, position + to_move - count, this->end() - count); // may throw
+ this->copy(first, last, position); // may throw
+ }
+ else
+ {
+ Iterator middle_iter = first;
+ std::advance(middle_iter, to_move);
+
+ this->uninitialized_copy(middle_iter, last, this->end()); // may throw
+ m_size += count - to_move; // update end
+ this->uninitialized_copy(position, position + to_move, position + count); // may throw
+ m_size += to_move; // update end
+ this->copy(first, middle_iter, position) ; // may throw
+ }
+ }
+
+ // assign
+
+ template <typename Iterator>
+ void assign_dispatch(Iterator first, Iterator last, boost::random_access_traversal_tag const& /*not_random_access*/)
+ {
+ size_type s = std::distance(first, last);
+
+ check_capacity(s);
+
+ if ( m_size <= s )
+ {
+ this->copy(first, first + m_size, this->begin()); // may throw
+ // TODO - perform uninitialized_copy first?
+ this->uninitialized_copy(first + m_size, last, this->end()); // may throw
+ }
+ else
+ {
+ this->copy(first, last, this->begin()); // may throw
+ this->destroy(this->begin() + s, this->end());
+ }
+ m_size = s; // update end
+ }
+
+ template <typename Iterator, typename Traversal>
+ void assign_dispatch(Iterator first, Iterator last, Traversal const& /*not_random_access*/)
+ {
+ size_type s = 0;
+ iterator it = this->begin();
+
+ for ( ; it != this->end() && first != last ; ++it, ++first, ++s )
+ *it = *first; // may throw
+
+ this->destroy(it, this->end());
+
+ std::pair<bool, size_type> copy_data =
+ this->uninitialized_copy_checked(first, last, it, std::distance(it, this->begin() + Capacity)); // may throw
+ s += copy_data.second;
+
+ check_capacity(copy_data.first ? s : Capacity + 1);
+
+ m_size = s; // update end
+ }
+
+ // uninitialized_copy_checked
+
+ template <typename Iterator>
+ std::pair<bool, size_type> uninitialized_copy_checked(Iterator first, Iterator last, iterator dest, size_type max_count)
+ {
+ size_type count = 0;
+ iterator it = dest;
+ try
+ {
+ for ( ; first != last ; ++it, ++first, ++count )
+ {
+ if ( max_count <= count )
+ return std::make_pair(false, count);
+
+ this->uninitialized_fill(it, *first); // may throw
+ }
+ }
+ catch(...)
+ {
+ this->destroy(dest, it);
+ throw;
+ }
+ return std::make_pair(true, count);
+ }
+
+ // copy
+
+ template <typename Iterator>
+ void copy(Iterator first, Iterator last, iterator dst)
+ {
+ typedef typename
+ mpl::and_<
+ has_trivial_assign<value_type>,
+ mpl::or_<
+ is_same<Iterator, value_type *>,
+ is_same<Iterator, const value_type *>
+ >
+ >::type
+ use_memcpy;
+
+ this->copy_dispatch(first, last, dst, use_memcpy()); // may throw
+ }
+
+ void copy_dispatch(const value_type * first, const value_type * last, value_type * dst,
+ boost::mpl::bool_<true> const& /*use_memcpy*/)
+ {
+ ::memcpy(dst, first, sizeof(value_type) * std::distance(first, last));
+ }
+
+ template <typename Iterator>
+ void copy_dispatch(Iterator first, Iterator last, value_type * dst,
+ boost::mpl::bool_<false> const& /*use_memcpy*/)
+ {
+ std::copy(first, last, dst); // may throw
+ }
+
+ // uninitialized_copy
+
+ template <typename Iterator>
+ void uninitialized_copy(Iterator first, Iterator last, iterator dst)
+ {
+ typedef typename
+ mpl::and_<
+ has_trivial_copy<value_type>,
+ mpl::or_<
+ is_same<Iterator, value_type *>,
+ is_same<Iterator, const value_type *>
+ >
+ >::type
+ use_memcpy;
+
+ this->uninitialized_copy_dispatch(first, last, dst, use_memcpy()); // may throw
+ }
+
+ void uninitialized_copy_dispatch(const value_type * first, const value_type * last, value_type * dst,
+ boost::mpl::bool_<true> const& /*use_memcpy*/)
+ {
+ ::memcpy(dst, first, sizeof(value_type) * std::distance(first, last));
+ }
+
+ template <typename Iterator>
+ void uninitialized_copy_dispatch(Iterator first, Iterator last, value_type * dst,
+ boost::mpl::bool_<false> const& /*use_memcpy*/)
+ {
+ std::uninitialized_copy(first, last, dst); // may throw
+ }
+
+ // uninitialized_fill
+
+ template <typename V>
+ void uninitialized_fill(iterator dst, V const& v)
+ {
+ typedef typename
+ mpl::and_<
+ has_trivial_copy<value_type>,
+ is_same<Value, value_type>
+ >::type
+ use_memcpy;
+
+ uninitialized_fill_dispatch(dst, v, use_memcpy()); // may throw
+ }
+
+ void uninitialized_fill_dispatch(value_type * ptr, value_type const& v,
+ boost::mpl::bool_<true> const& /*use_memcpy*/)
+ {
+ // TODO - check if value_type has operator& defined and call this version only if it hasn't
+ const value_type * vptr = &v;
+ ::memcpy(ptr, vptr, sizeof(value_type));
+ }
+
+ template <typename V>
+ void uninitialized_fill_dispatch(value_type * ptr, V const& v,
+ boost::mpl::bool_<false> const& /*use_memcpy*/)
+ {
+ new (ptr) value_type(v); // may throw
+ }
+
+ // move
+
+ void move(iterator first, iterator last, iterator dst)
+ {
+ this->move_dispatch(first, last, dst, has_trivial_assign<value_type>()); // may throw
+ }
+
+ void move_dispatch(value_type * first, value_type * last, value_type * dst,
+ boost::true_type const& /*has_trivial_assign*/)
+ {
+ ::memmove(dst, first, sizeof(value_type) * std::distance(first, last));
+ }
+
+ void move_dispatch(value_type * first, value_type * last, value_type * dst,
+ boost::false_type const& /*has_trivial_assign*/)
+ {
+ std::copy(first, last, dst); // may throw
+ }
+
+ // move_backward
+
+ void move_backward(iterator first, iterator last, iterator dst)
+ {
+ this->move_backward_dispatch(first, last, dst, has_trivial_assign<value_type>()); // may throw
+ }
+
+ void move_backward_dispatch(value_type * first, value_type * last, value_type * dst,
+ boost::true_type const& /*has_trivial_assign*/)
+ {
+ difference_type n = std::distance(first, last);
+ ::memmove(dst - n, first, sizeof(value_type) * n);
+ }
+
+ void move_backward_dispatch(value_type * first, value_type * last, value_type * dst,
+ boost::false_type const& /*has_trivial_assign*/)
+ {
+ std::copy_backward(first, last, dst); // may throw
+ }
+
+ // uninitialized_fill
+
+ template <typename V>
+ void fill(iterator dst, V const& v)
+ {
+ fill_dispatch(dst, v, has_trivial_assign<value_type>()); // may throw
+ }
+
+ void fill_dispatch(value_type * ptr, value_type const& v,
+ boost::true_type const& /*has_trivial_assign*/)
+ {
+ // TODO - check if value_type has operator& defined and call this version only if it hasn't
+ const value_type * vptr = &v;
+ ::memcpy(ptr, vptr, sizeof(value_type));
+ }
+
+ template <typename V>
+ void fill_dispatch(value_type * ptr, V const& v,
+ boost::false_type const& /*has_trivial_assign*/)
+ {
+ *ptr = v; // may throw
+ }
+
+ // destroy
+
+ void destroy(iterator first, iterator last)
+ {
+ this->destroy_dispatch(first, last, has_trivial_destructor<value_type>());
+ }
+
+ void destroy_dispatch(value_type * /*first*/, value_type * /*last*/,
+ boost::true_type const& /*has_trivial_destructor*/)
+ {}
+
+ void destroy_dispatch(value_type * first, value_type * last,
+ boost::false_type const& /*has_trivial_destructor*/)
+ {
+ for ( ; first != last ; ++first )
+ first->~value_type();
+ }
+
+ // destroy
+
+ void destroy(iterator it)
+ {
+ this->destroy_dispatch(it, has_trivial_destructor<value_type>());
+ }
+
+ void destroy_dispatch(value_type * /*ptr*/,
+ boost::true_type const& /*has_trivial_destructor*/)
+ {}
+
+ void destroy_dispatch(value_type * ptr,
+ boost::false_type const& /*has_trivial_destructor*/)
+ {
+ ptr->~value_type();
+ }
+
+ // construct
+
+ void construct(iterator first, iterator last)
+ {
+ this->construct_dispatch(first, last, has_trivial_constructor<value_type>()); // may throw
+ }
+
+ void construct_dispatch(value_type * /*first*/, value_type * /*last*/,
+ boost::true_type const& /*has_trivial_constructor*/)
+ {}
+
+ void construct_dispatch(value_type * first, value_type * last,
+ boost::false_type const& /*has_trivial_constructor*/)
+ {
+ value_type * it = first;
+ try
+ {
+ for ( ; it != last ; ++it )
+ new (it) value_type(); // may throw
+ }
+ catch(...)
+ {
+ this->destroy(first, it);
+ throw;
+ }
+ }
+
+ void check_capacity(size_type s) const
+ {
+ BOOST_ASSERT_MSG(s <= Capacity, "size can't exceed the capacity");
+ //if ( Capacity < s ) throw std::bad_alloc();
+ }
+
+ void check_empty() const
+ {
+ BOOST_ASSERT_MSG(0 < m_size, "the container is empty");
+ }
+
+ void check_iterator_end_neq(const_iterator position) const
+ {
+ BOOST_ASSERT_MSG(this->begin() <= position && position < this->end(), "iterator out of bounds");
+
+ /*BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(
+ difference_type dist = std::distance(this->begin(), position);
+ )
+ BOOST_ASSERT_MSG(
+ 0 <= dist &&
+ ( sizeof(dist) <= sizeof(m_size) ?
+ (static_cast<size_type>(dist) < m_size) :
+ ( dist < static_cast<difference_type>(m_size))
+ ), "invalid iterator"
+ );*/
+ }
+
+ void check_iterator_end_eq(const_iterator position) const
+ {
+ BOOST_ASSERT_MSG(this->begin() <= position && position <= this->end(), "iterator out of bounds");
+
+ /*BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(
+ difference_type dist = std::distance(this->begin(), position);
+ )
+ BOOST_ASSERT_MSG(
+ 0 <= dist &&
+ ( sizeof(dist) <= sizeof(m_size) ?
+ (static_cast<size_type>(dist) <= m_size) :
+ ( dist <= static_cast<difference_type>(m_size))
+ ), "invalid iterator"
+ );*/
+ }
+
+ Value * ptr()
+ {
+ return (reinterpret_cast<Value*>(m_storage.address()));
+ }
+
+ const Value * ptr() const
+ {
+ return (reinterpret_cast<const Value*>(m_storage.address()));
+ }
+
+ boost::aligned_storage<sizeof(Value[Capacity]), boost::alignment_of<Value[Capacity]>::value> m_storage;
+ size_type m_size;
+};
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tags.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tags.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,25 @@
+// Boost.Geometry Index
+//
+// Tags used by the predicates checks implementation.
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_TAGS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_DETAIL_TAGS_HPP
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail {
+
+struct value_tag {};
+struct envelope_tag {};
+
+} // namespace detail
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_TAGS_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tuples.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/detail/tuples.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,184 @@
+// Boost.Geometry Index
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_TUPLES_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_TUPLES_HPP
+
+#include <boost/tuple/tuple.hpp>
+
+// TODO move this to index/tuples and separate algorithms
+
+namespace boost { namespace geometry { namespace index { namespace detail {
+
+namespace tuples {
+
+// find_index
+
+namespace detail {
+
+template <typename Tuple, typename El, size_t N>
+struct find_index;
+
+template <typename Tuple, typename El, size_t N, typename CurrentEl>
+struct find_index_impl
+{
+ static const size_t value = find_index<Tuple, El, N - 1>::value;
+};
+
+template <typename Tuple, typename El, size_t N>
+struct find_index_impl<Tuple, El, N, El>
+{
+ static const size_t value = N - 1;
+};
+
+template <typename Tuple, typename El, typename CurrentEl>
+struct find_index_impl<Tuple, El, 1, CurrentEl>
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ ELEMENT_NOT_FOUND,
+ (find_index_impl));
+};
+
+template <typename Tuple, typename El>
+struct find_index_impl<Tuple, El, 1, El>
+{
+ static const size_t value = 0;
+};
+
+template <typename Tuple, typename El, size_t N>
+struct find_index
+{
+ static const size_t value =
+ find_index_impl<
+ Tuple,
+ El,
+ N,
+ typename boost::tuples::element<N - 1, Tuple>::type
+ >::value;
+};
+
+} // namespace detail
+
+template <typename Tuple, typename El>
+struct find_index
+{
+ static const size_t value =
+ detail::find_index<
+ Tuple,
+ El,
+ boost::tuples::length<Tuple>::value
+ >::value;
+};
+
+// types_equal
+
+template <typename T1, typename T2>
+struct equal
+{
+ static const bool value = false;
+};
+
+template <typename T>
+struct equal<T, T>
+{
+ static const bool value = true;
+};
+
+// has
+
+namespace detail {
+
+template <typename Tuple, typename El, size_t N>
+struct has
+{
+ static const bool value
+ = equal<
+ typename boost::tuples::element<N - 1, Tuple>::type,
+ El
+ >::value
+ || has<Tuple, El, N - 1>::value;
+};
+
+template <typename Tuple, typename El>
+struct has<Tuple, El, 1>
+{
+ static const bool value
+ = equal<
+ typename boost::tuples::element<0, Tuple>::type,
+ El
+ >::value;
+};
+
+} // namespace detail
+
+template <typename Tuple, typename El>
+struct has
+{
+ static const bool value
+ = detail::has<
+ Tuple,
+ El,
+ boost::tuples::length<Tuple>::value
+ >::value;
+};
+
+// add
+
+template <typename Tuple, typename El>
+struct add
+{
+ BOOST_MPL_ASSERT_MSG(
+ (false),
+ NOT_IMPLEMENTED_FOR_THIS_TUPLE_TYPE,
+ (add));
+};
+
+template <typename T1, typename T>
+struct add<boost::tuple<T1>, T>
+{
+ typedef boost::tuple<T1, T> type;
+};
+
+template <typename T1, typename T2, typename T>
+struct add<boost::tuple<T1, T2>, T>
+{
+ typedef boost::tuple<T1, T2, T> type;
+};
+
+// add_if
+
+template <typename Tuple, typename El, bool Cond>
+struct add_if
+{
+ typedef Tuple type;
+};
+
+template <typename Tuple, typename El>
+struct add_if<Tuple, El, true>
+{
+ typedef typename add<Tuple, El>::type type;
+};
+
+// add_unique
+
+template <typename Tuple, typename El>
+struct add_unique
+{
+ typedef typename add_if<
+ Tuple,
+ El,
+ !has<Tuple, El>::value
+ >::type type;
+};
+
+} // namespace tuples
+
+}}}} // namespace boost::geometry::index::detail
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_TAGS_HPP

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/distance_predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/distance_predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/distance_predicates.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -11,11 +11,7 @@
 #ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_DISTANCE_PREDICATES_HPP
 #define BOOST_GEOMETRY_EXTENSIONS_INDEX_DISTANCE_PREDICATES_HPP
 
-#include <boost/geometry/extensions/index/algorithms/comparable_distance_near.hpp>
-#include <boost/geometry/extensions/index/algorithms/comparable_distance_far.hpp>
-#include <boost/geometry/extensions/index/algorithms/comparable_distance_centroid.hpp>
-
-#include <boost/geometry/extensions/index/tuples.hpp>
+#include <boost/geometry/extensions/index/detail/distance_predicates.hpp>
 
 /*!
 \defgroup distance_predicates Distance predicates (boost::geometry::index::)
@@ -23,86 +19,6 @@
 
 namespace boost { namespace geometry { namespace index {
 
-//TODO: awulkiew - consider storing values instead of const references
-// it may be faster and it eliminates problems with storing of references to temporaries
-// moreover user may use boost::cref
-
-// TODO: awulkiew - what with coordinate systems other than cartesian?
-// do comparable_distance returns distance in coordinate system of objects used?
-// what if objects are in different systems?
-// should index algorithms work exactly like comparable_distance or not?
-
-namespace detail {
-
-// relations
-
-template <typename T>
-struct to_nearest
-{
- to_nearest(T const& v) : value(v) {}
- T value;
-};
-
-template <typename T>
-struct to_centroid
-{
- to_centroid(T const& v) : value(v) {}
- T value;
-};
-
-template <typename T>
-struct to_furthest
-{
- to_furthest(T const& v) : value(v) {}
- T value;
-};
-
-// tags
-
-struct to_nearest_tag {};
-struct to_centroid_tag {};
-struct to_furthest_tag {};
-
-// relation
-
-template <typename T>
-struct relation
-{
- typedef T value_type;
- typedef to_nearest_tag tag;
- static inline T const& value(T const& v) { return v; }
- static inline T & value(T & v) { return v; }
-};
-
-template <typename T>
-struct relation< to_nearest<T> >
-{
- typedef T value_type;
- typedef to_nearest_tag tag;
- static inline T const& value(to_nearest<T> const& r) { return r.value; }
- static inline T & value(to_nearest<T> & r) { return r.value; }
-};
-
-template <typename T>
-struct relation< to_centroid<T> >
-{
- typedef T value_type;
- typedef to_centroid_tag tag;
- static inline T const& value(to_centroid<T> const& r) { return r.value; }
- static inline T & value(to_centroid<T> & r) { return r.value; }
-};
-
-template <typename T>
-struct relation< to_furthest<T> >
-{
- typedef T value_type;
- typedef to_furthest_tag tag;
- static inline T const& value(to_furthest<T> const& r) { return r.value; }
- static inline T & value(to_furthest<T> & r) { return r.value; }
-};
-
-} // namespace detail
-
 // relations generators
 
 /*!
@@ -173,83 +89,6 @@
     return detail::to_furthest<T>(v);
 }
 
-// distance predicates
-
-namespace detail {
-
-// TODO: awulkiew - consider storing points instead of PointRelations in predicates below
-
-template <typename PointRelation>
-struct unbounded
- : nonassignable
-{
- inline explicit unbounded(PointRelation const& pr)
- : point_relation(pr)
- {}
-
- PointRelation point_relation;
-};
-
-template <typename PointRelation, typename MinRelation>
-struct min_bounded
- : nonassignable
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
-
- inline min_bounded(PointRelation const& pr, MinRelation const& min_rel)
- : point_relation(pr)
- , comparable_min(
- relation<MinRelation>::value(min_rel) *
- relation<MinRelation>::value(min_rel) )
- {}
-
- PointRelation point_relation;
- distance_type comparable_min;
-};
-
-template <typename PointRelation, typename MaxRelation>
-struct max_bounded
- : nonassignable
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
-
- inline max_bounded(PointRelation const& pr, MaxRelation const& max_rel)
- : point_relation(pr)
- , comparable_max(
- relation<MaxRelation>::value(max_rel) *
- relation<MaxRelation>::value(max_rel) )
- {}
-
- PointRelation point_relation;
- distance_type comparable_max;
-};
-
-template <typename PointRelation, typename MinRelation, typename MaxRelation>
-struct bounded
- : nonassignable
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename geometry::default_distance_result<point_type, point_type>::type distance_type;
-
- inline bounded(PointRelation const& pr, MinRelation const& min_rel, MaxRelation const& max_rel)
- : point_relation(pr)
- , comparable_min(
- relation<MinRelation>::value(min_rel) *
- relation<MinRelation>::value(min_rel) )
- , comparable_max(
- relation<MaxRelation>::value(max_rel) *
- relation<MaxRelation>::value(max_rel) )
- {}
-
- PointRelation point_relation;
- distance_type comparable_min;
- distance_type comparable_max;
-};
-
-} // namespace detail
-
 // distance predicates generators
 
 /*!
@@ -356,487 +195,6 @@
     return detail::bounded<PointRelation, MinRelation, MaxRelation>(pr, minr, maxr);
 }
 
-// algorithms
-
-namespace detail{
-
-// point_relation
-
-template <typename PointRelation>
-struct point_relation
-{
- typedef PointRelation type;
-};
-
-template <typename PointRelation>
-struct point_relation< detail::unbounded<PointRelation> >
-{
- typedef PointRelation type;
-};
-
-template <typename PointRelation, typename MinRelation>
-struct point_relation< detail::min_bounded<PointRelation, MinRelation> >
-{
- typedef PointRelation type;
-};
-
-template <typename PointRelation, typename MaxRelation>
-struct point_relation< detail::max_bounded<PointRelation, MaxRelation> >
-{
- typedef PointRelation type;
-};
-
-template <typename PointRelation, typename MinRelation, typename MaxRelation>
-struct point_relation< detail::bounded<PointRelation, MinRelation, MaxRelation> >
-{
- typedef PointRelation type;
-};
-
-
-} // namespace detail
-
-namespace detail
-{
-
-// cdist
-
-template <typename T, typename Tag>
-struct cdist
-{
- T value;
-};
-
-// cdist_merge
-
-template <typename CDistTuple, typename CDist>
-struct cdist_merge
-{
- typedef typename index::tuples::add_unique<
- CDistTuple,
- CDist
- >::type type;
-};
-
-template <typename T, typename Tag, typename OtherTag>
-struct cdist_merge<
- cdist<T, Tag>,
- cdist<T, OtherTag> >
-{
- typedef boost::tuple<
- cdist<T, Tag>,
- cdist<T, OtherTag>
- > type;
-};
-
-template <typename T, typename Tag>
-struct cdist_merge<
- cdist<T, Tag>,
- cdist<T, Tag> >
-{
- typedef cdist<T, Tag> type;
-};
-
-// cdist_value_type
-
-template <typename CDistTuple>
-struct cdist_value
-{
- typedef typename cdist_value<
- typename boost::tuples::element<0, CDistTuple>::type
- >::type type;
-
- template <typename Tag>
- static inline type & get(CDistTuple & cdtup)
- {
- return boost::get<
- index::tuples::find_index<
- CDistTuple,
- cdist<type, Tag>
- >::value
- >(cdtup).value;
- }
-
- template <typename Tag>
- static inline type const& get(CDistTuple const& cdtup)
- {
- return boost::get<
- index::tuples::find_index<
- CDistTuple,
- cdist<type, Tag>
- >::value
- >(cdtup).value;
- }
-};
-
-template <typename T, typename Tag>
-struct cdist_value<
- cdist<T, Tag>
->
-{
- typedef T type;
-
- template <typename Tag2>
- static inline type & get(cdist<T, Tag> & cd)
- {
- BOOST_MPL_ASSERT_MSG(
- (tuples::equal< cdist<T, Tag2>, cdist<T, Tag> >::value),
- TAGS_DO_NOT_MATCH,
- (cdist_value));
-
- return cd.value;
- }
-
- template <typename Tag2>
- static inline type const& get(cdist<T, Tag> const& cd)
- {
- BOOST_MPL_ASSERT_MSG(
- (tuples::equal< cdist<T, Tag2>, cdist<T, Tag> >::value),
- TAGS_DO_NOT_MATCH,
- (cdist_value));
-
- return cd.value;
- }
-};
-
-} // namespace detail
-
-namespace detail {
-
-// distances_calc_impl_rel
-
-template <typename RelDist>
-struct distances_calc_impl_rel
-{
- BOOST_MPL_ASSERT_MSG(
- (false),
- NOT_IMPLEMENTED_FOR_THIS_RELATION,
- (distances_calc_impl_rel));
-};
-
-template <typename T>
-struct distances_calc_impl_rel<
- cdist<T, detail::to_nearest_tag>
->
-{
- template <typename Point, typename Indexable>
- typename geometry::default_distance_result<Point, Indexable>::type
- static inline apply(Point const& p, Indexable const& i)
- {
- return index::comparable_distance_near(p, i);
- }
-};
-
-template <typename T>
-struct distances_calc_impl_rel<
- cdist<T, detail::to_centroid_tag>
->
-{
- template <typename Point, typename Indexable>
- typename geometry::default_distance_result<Point, Indexable>::type
- static inline apply(Point const& p, Indexable const& i)
- {
- return index::comparable_distance_centroid(p, i);
- }
-};
-
-template <typename T>
-struct distances_calc_impl_rel<
- cdist<T, detail::to_furthest_tag>
->
-{
- template <typename Point, typename Indexable>
- typename geometry::default_distance_result<Point, Indexable>::type
- static inline apply(Point const& p, Indexable const& i)
- {
- return index::comparable_distance_far(p, i);
- }
-};
-
-// distances_calc_impl_tuple
-
-template <typename Distances, typename Point, typename Indexable, size_t N>
-struct distances_calc_impl_tuple
-{
- // TODO MPL ASSERT 0 < N
- static inline void apply(Distances & d, Point const& p, Indexable const&i)
- {
- boost::get<N - 1>(d).value =
- distances_calc_impl_rel<
- typename boost::tuples::element<N - 1, Distances>::type
- >::apply(p, i);
-
- distances_calc_impl_tuple<
- Distances,
- Point,
- Indexable,
- N - 1
- >::apply(d, p, i);
- }
-};
-
-template <typename Distances, typename Point, typename Indexable>
-struct distances_calc_impl_tuple<Distances, Point, Indexable, 1>
-{
- static inline void apply(Distances & d, Point const& p, Indexable const&i)
- {
- boost::get<0>(d).value =
- distances_calc_impl_rel<
- typename boost::tuples::element<0, Distances>::type
- >::apply(p, i);
- }
-};
-
-// distances_calc_impl
-
-template <typename Distances, typename Point, typename Indexable>
-struct distances_calc_impl
-{
- static inline void apply(Distances & d, Point const& p, Indexable const&i)
- {
- distances_calc_impl_tuple<
- Distances,
- Point,
- Indexable,
- boost::tuples::length<Distances>::value
- >::apply(d, p, i);
- }
-};
-
-template <typename T, typename Tag, typename Point, typename Indexable>
-struct distances_calc_impl<
- cdist<T, Tag>,
- Point,
- Indexable
->
-{
- static inline void apply(cdist<T, Tag> & d, Point const& p, Indexable const&i)
- {
- d.value = distances_calc_impl_rel<
- cdist<T, Tag>
- >::apply(p, i);
- }
-};
-
-// distances_calc
-
-template <typename PointRelation, typename Indexable, typename Tag>
-struct distances_calc
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename detail::relation<PointRelation>::tag point_relation_tag;
- typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
-
- typedef detail::cdist<distance_type, point_relation_tag> result_type;
-
- static inline result_type apply(PointRelation const& p, Indexable const& i)
- {
- result_type res;
- distances_calc_impl<result_type, point_type, Indexable>
- ::apply(res, relation<PointRelation>::value(p), i);
- return res;
- }
-};
-
-template <typename PointRelation, typename Indexable, typename Tag>
-struct distances_calc<
- detail::unbounded<PointRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename detail::relation<PointRelation>::tag point_relation_tag;
- typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
-
- typedef detail::cdist<distance_type, point_relation_tag> result_type;
-
- static inline result_type apply(detail::unbounded<PointRelation> const& pp, Indexable const& i)
- {
- result_type res;
- distances_calc_impl<result_type, point_type, Indexable>
- ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
- return res;
- }
-};
-
-template <typename PointRelation, typename MinRelation, typename Indexable, typename Tag>
-struct distances_calc<
- detail::min_bounded<PointRelation, MinRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename detail::relation<PointRelation>::tag point_relation_tag;
- typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
- typedef typename detail::relation<MinRelation>::tag min_relation_tag;
-
- typedef typename detail::cdist_merge<
- cdist<distance_type, point_relation_tag>,
- cdist<distance_type, min_relation_tag>
- >::type result_type;
-
- static inline result_type apply(detail::min_bounded<PointRelation, MinRelation> const& pp, Indexable const& i)
- {
- result_type res;
- distances_calc_impl<result_type, point_type, Indexable>
- ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
- return res;
- }
-};
-
-template <typename PointRelation, typename MaxRelation, typename Indexable, typename Tag>
-struct distances_calc<
- detail::max_bounded<PointRelation, MaxRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename detail::relation<PointRelation>::tag point_relation_tag;
- typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
- typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
-
- typedef typename detail::cdist_merge<
- cdist<distance_type, point_relation_tag>,
- cdist<distance_type, max_relation_tag>
- >::type result_type;
-
- static inline result_type apply(detail::max_bounded<PointRelation, MaxRelation> const& pp, Indexable const& i)
- {
- result_type res;
- distances_calc_impl<result_type, point_type, Indexable>
- ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
- return res;
- }
-};
-
-template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Indexable, typename Tag>
-struct distances_calc<
- detail::bounded<PointRelation, MinRelation, MaxRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<PointRelation>::value_type point_type;
- typedef typename detail::relation<PointRelation>::tag point_relation_tag;
- typedef typename geometry::default_distance_result<point_type, Indexable>::type distance_type;
- typedef typename detail::relation<MinRelation>::tag min_relation_tag;
- typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
-
- typedef typename detail::cdist_merge<
- typename detail::cdist_merge<
- cdist<distance_type, point_relation_tag>,
- cdist<distance_type, min_relation_tag>
- >::type,
- cdist<distance_type, max_relation_tag>
- >::type result_type;
-
- static inline result_type apply(
- detail::bounded<PointRelation, MinRelation, MaxRelation> const& pp,
- Indexable const& i)
- {
- result_type res;
- distances_calc_impl<result_type, point_type, Indexable>
- ::apply(res, relation<PointRelation>::value(pp.point_relation), i);
- return res;
- }
-};
-
-// distances_predicates_check
-
-// TODO explicitly define Distances type ?
-// TODO move distance_calc and distance_comp into geometry::index ?
-
-template <typename PointRelation, typename Indexable, typename Tag>
-struct distances_predicates_check
-{
- template <typename Distances>
- static inline bool apply(PointRelation const&, Distances const&)
- {
- return true;
- }
-};
-
-template <typename PointRelation, typename Indexable, typename Tag>
-struct distances_predicates_check<
- detail::unbounded<PointRelation>,
- Indexable,
- Tag
->
-{
- template <typename Distances>
- static inline bool apply(detail::unbounded<PointRelation> const&, Distances const&)
- {
- return true;
- }
-};
-
-template <typename PointRelation, typename MinRelation, typename Indexable, typename Tag>
-struct distances_predicates_check<
- detail::min_bounded<PointRelation, MinRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<MinRelation>::tag min_relation_tag;
-
- template <typename Distances>
- static inline bool apply(
- detail::min_bounded<PointRelation, MinRelation> const& pred,
- Distances const& d)
- {
- return pred.comparable_min <=
- detail::cdist_value<Distances>::template get<min_relation_tag>(d);
- }
-};
-
-template <typename PointRelation, typename MaxRelation, typename Indexable, typename Tag>
-struct distances_predicates_check<
- detail::max_bounded<PointRelation, MaxRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
-
- template <typename Distances>
- static inline bool apply(
- detail::max_bounded<PointRelation, MaxRelation> const& pred,
- Distances const& d)
- {
- return pred.comparable_max <=
- detail::cdist_value<Distances>::template get<max_relation_tag>(d);
- }
-};
-
-template <typename PointRelation, typename MinRelation, typename MaxRelation, typename Indexable, typename Tag>
-struct distances_predicates_check<
- detail::bounded<PointRelation, MinRelation, MaxRelation>,
- Indexable,
- Tag
->
-{
- typedef typename detail::relation<MinRelation>::tag min_relation_tag;
- typedef typename detail::relation<MaxRelation>::tag max_relation_tag;
-
- template <typename Distances>
- static inline bool apply(
- detail::bounded<PointRelation, MinRelation, MaxRelation> const& pred,
- Distances const& d)
- {
- return pred.comparable_min
- <= detail::cdist_value<Distances>::template get<min_relation_tag>(d)
- && detail::cdist_value<Distances>::template get<max_relation_tag>(d)
- <= pred.comparable_max;
- }
-};
-
-// TODO calculate all of this for Boxes only!
-// for Points calculate only 1 distance allways
-
-} // namespace detail
-
 }}} // namespace boost::geometry::index
 
 #endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_DISTANCE_PREDICATES_HPP

Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/nonassignable.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/nonassignable.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,23 +0,0 @@
-// Boost.Geometry Index
-//
-// Nonassignable base class.
-//
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-//
-// Use, modification and distribution is subject to 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)
-
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP
-
-namespace boost { namespace geometry { namespace index {
-
-class nonassignable
-{
- nonassignable & operator=(nonassignable const&);
-};
-
-}}} // namespace boost::geometry::index
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_NONASSIGNABLE_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/parameters.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/parameters.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,208 @@
+// Boost.Geometry Index
+//
+// R-tree algorithms parameters
+//
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_PARAMETERS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_PARAMETERS_HPP
+
+#include <limits>
+
+namespace boost { namespace geometry { namespace index {
+
+// TODO: awulkiew - implement those:
+//if ( m_min_elems_per_node < 1 )
+// m_min_elems_per_node = 1;
+//if ( m_max_elems_per_node < 2 )
+// m_max_elems_per_node = 2;
+
+/*!
+\brief Linear r-tree creation algorithm parameters.
+
+\tparam MaxElements Maximum number of elements in nodes.
+\tparam MinElements Minimum number of elements in nodes.
+*/
+template <size_t MaxElements, size_t MinElements>
+struct linear
+{
+ static const size_t max_elements = MaxElements;
+ static const size_t min_elements = MinElements;
+
+ static size_t get_max_elements() { return MaxElements; }
+ static size_t get_min_elements() { return MinElements; }
+};
+
+/*!
+\brief Quadratic r-tree creation algorithm parameters.
+
+\tparam MaxElements Maximum number of elements in nodes.
+\tparam MinElements Minimum number of elements in nodes.
+*/
+template <size_t MaxElements, size_t MinElements>
+struct quadratic
+{
+ static const size_t max_elements = MaxElements;
+ static const size_t min_elements = MinElements;
+
+ static size_t get_max_elements() { return MaxElements; }
+ static size_t get_min_elements() { return MinElements; }
+};
+
+namespace detail {
+
+template <size_t MaxElements>
+struct default_rstar_reinserted_elements_s
+{
+ static const size_t value = (MaxElements * 3) / 10;
+};
+
+} // namespace detail
+
+/*!
+\brief R*-tree creation algorithm parameters.
+
+\tparam MaxElements Maximum number of elements in nodes.
+\tparam MinElements Minimum number of elements in nodes.
+\tparam OverlapCostThreshold The number of leaf node children elements above which
+ nearly minimum overlap cost is calculated instead of minimum
+ overlap cost. If 0 minimum overlap cost is always calculated.
+\tparam ReinsertedElements Number of elements reinserted by forced reinsertions algorithm.
+*/
+template <size_t MaxElements,
+ size_t MinElements,
+ size_t OverlapCostThreshold = 0,
+ size_t ReinsertedElements = detail::default_rstar_reinserted_elements_s<MaxElements>::value
+ >
+struct rstar
+{
+ static const size_t max_elements = MaxElements;
+ static const size_t min_elements = MinElements;
+ static const size_t overlap_cost_threshold = OverlapCostThreshold;
+ static const size_t reinserted_elements = ReinsertedElements;
+
+ static size_t get_max_elements() { return MaxElements; }
+ static size_t get_min_elements() { return MinElements; }
+ static size_t get_overlap_cost_threshold() { return OverlapCostThreshold; }
+ static size_t get_reinserted_elements() { return ReinsertedElements; }
+};
+
+//template <size_t MaxElements, size_t MinElements>
+//struct kmeans
+//{
+// static const size_t max_elements = MaxElements;
+// static const size_t min_elements = MinElements;
+//};
+
+namespace runtime {
+
+/*!
+\brief Linear r-tree creation algorithm parameters.
+*/
+class linear
+{
+public:
+ /*!
+ \brief The constructor.
+
+ \param max_elements Maximum number of elements in nodes.
+ \param min_elements Minimum number of elements in nodes.
+ */
+ linear(size_t max_elements, size_t min_elements)
+ : m_max_elements(max_elements)
+ , m_min_elements(min_elements)
+ {}
+
+ size_t get_max_elements() const { return m_max_elements; }
+ size_t get_min_elements() const { return m_min_elements; }
+
+private:
+ size_t m_max_elements;
+ size_t m_min_elements;
+};
+
+/*!
+\brief Quadratic r-tree creation algorithm parameters.
+*/
+class quadratic
+{
+public:
+ /*!
+ \brief The constructor.
+
+ \param max_elements Maximum number of elements in nodes.
+ \param min_elements Minimum number of elements in nodes.
+ */
+ quadratic(size_t max_elements, size_t min_elements)
+ : m_max_elements(max_elements)
+ , m_min_elements(min_elements)
+ {}
+
+ size_t get_max_elements() const { return m_max_elements; }
+ size_t get_min_elements() const { return m_min_elements; }
+
+private:
+ size_t m_max_elements;
+ size_t m_min_elements;
+};
+
+namespace detail {
+
+inline size_t default_rstar_reinserted_elements_d()
+{
+ return (std::numeric_limits<size_t>::max)();
+};
+
+} // namespace detail
+
+/*!
+\brief R*-tree creation algorithm parameters.
+*/
+class rstar
+{
+public:
+ /*!
+ \brief The constructor.
+
+ \param max_elements Maximum number of elements in nodes.
+ \param min_elements Minimum number of elements in nodes.
+ \param overlap_cost_threshold The number of leaf node children elements above which
+ nearly minimum overlap cost is calculated instead of minimum
+ overlap cost. If 0 minimum overlap cost is always calculated.
+ \param reinserted_elements Number of elements reinserted by forced reinsertions algorithm.
+ */
+ rstar(size_t max_elements,
+ size_t min_elements,
+ size_t overlap_cost_threshold = 0,
+ size_t reinserted_elements = detail::default_rstar_reinserted_elements_d())
+ : m_max_elements(max_elements)
+ , m_min_elements(min_elements)
+ , m_overlap_cost_threshold(overlap_cost_threshold)
+ , m_reinserted_elements(
+ detail::default_rstar_reinserted_elements_d() == reinserted_elements ?
+ (max_elements * 3) / 10 :
+ reinserted_elements
+ )
+ {}
+
+ size_t get_max_elements() const { return m_max_elements; }
+ size_t get_min_elements() const { return m_min_elements; }
+ size_t get_overlap_cost_threshold() const { return m_overlap_cost_threshold; }
+ size_t get_reinserted_elements() const { return m_reinserted_elements; }
+
+private:
+ size_t m_max_elements;
+ size_t m_min_elements;
+ size_t m_overlap_cost_threshold;
+ size_t m_reinserted_elements;
+};
+
+} // namespace runtime
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_PARAMETERS_HPP

Modified: sandbox-branches/geometry/index/boost/geometry/extensions/index/predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/predicates.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -18,113 +18,14 @@
 // TODO: awulkiew - temporary
 #include <boost/geometry/algorithms/covered_by.hpp>
 
+#include <boost/geometry/extensions/index/detail/predicates.hpp>
+
 /*!
 \defgroup predicates Spatial predicates (boost::geometry::index::)
 */
 
 namespace boost { namespace geometry { namespace index {
 
-namespace detail {
-
-// predicates
-
-struct empty {};
-
-template <typename ValuePredicate>
-struct value
-{
- value(ValuePredicate const& vpred) : value_predicate(vpred) {}
- ValuePredicate value_predicate;
-};
-
-template <typename Geometry>
-struct covered_by
-{
- covered_by(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct disjoint
-{
- disjoint(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct intersects
-{
- intersects(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct overlaps
-{
- overlaps(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-//template <typename Geometry>
-//struct touches
-//{
-// touches(Geometry const& g) : geometry(g) {}
-// Geometry geometry;
-//};
-
-template <typename Geometry>
-struct within
-{
- within(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct not_covered_by
-{
- not_covered_by(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct not_disjoint
-{
- not_disjoint(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct not_intersects
-{
- not_intersects(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-template <typename Geometry>
-struct not_overlaps
-{
- not_overlaps(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-//template <typename Geometry>
-//struct not_touches
-//{
-// not_touches(Geometry const& g) : geometry(g) {}
-// Geometry geometry;
-//};
-
-template <typename Geometry>
-struct not_within
-{
- not_within(Geometry const& g) : geometry(g) {}
- Geometry geometry;
-};
-
-} // namespace detail
-
-// generators
-
 /*!
 \brief Generate empty predicate.
 
@@ -267,246 +168,6 @@
     return detail::within<Geometry>(g);
 }
 
-namespace detail
-{
-
-// predicate check
-
-// TODO: awulkiew - consider passing Value/Node and Translator instead of
-// Value and Indexable
-
-template <typename Geometry, typename Tag>
-struct predicate_check
-{
- template <typename Value, typename Indexable>
- static inline bool apply(Geometry const& g, Value const&, Indexable const& i)
- {
- return geometry::intersects(i, g);
- }
-};
-
-template <typename Tag>
-struct predicate_check<empty, Tag>
-{
- template <typename Geometry, typename Value, typename Indexable>
- static inline bool apply(Geometry const&, Value const&, Indexable const&)
- {
- return true;
- }
-};
-
-template <typename ValuePredicate, typename Tag>
-struct predicate_check<value<ValuePredicate>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(value<ValuePredicate> const& p, Value const& v, Indexable const&)
- {
- return p.value_predicate(v);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<covered_by<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(covered_by<Geometry> const& p, Value const&, Indexable const& i)
- {
- return geometry::covered_by(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<disjoint<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(disjoint<Geometry> const& p, Value const&, Indexable const& i)
- {
- return geometry::disjoint(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<intersects<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(intersects<Geometry> const& p, Value const&, Indexable const& i)
- {
- return geometry::intersects(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<overlaps<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(overlaps<Geometry> const& p, Value const&, Indexable const& i)
- {
- return geometry::overlaps(i, p.geometry);
- }
-};
-
-//template <typename Geometry, typename Tag>
-//struct predicate_check<touches<Geometry>, Tag>
-//{
-// template <typename Value, typename Indexable>
-// static inline bool apply(touches<Geometry> const& p, Value const&, Indexable const& i)
-// {
-// return geometry::touches(i, p.geometry);
-// }
-//};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<within<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(within<Geometry> const& p, Value const&, Indexable const& i)
- {
- return geometry::within(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<not_covered_by<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(not_covered_by<Geometry> const& p, Value const&, Indexable const& i)
- {
- return !geometry::covered_by(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<not_disjoint<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(not_disjoint<Geometry> const& p, Value const&, Indexable const& i)
- {
- return !geometry::disjoint(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<not_intersects<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(not_intersects<Geometry> const& p, Value const&, Indexable const& i)
- {
- return !geometry::intersects(i, p.geometry);
- }
-};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<not_overlaps<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(not_overlaps<Geometry> const& p, Value const&, Indexable const& i)
- {
- return !geometry::overlaps(i, p.geometry);
- }
-};
-
-//template <typename Geometry, typename Tag>
-//struct predicate_check<not_touches<Geometry>, Tag>
-//{
-// template <typename Value, typename Indexable>
-// static inline bool apply(not_touches<Geometry> const& p, Value const&, Indexable const& i)
-// {
-// return !geometry::touches(i, p.geometry);
-// }
-//};
-
-template <typename Geometry, typename Tag>
-struct predicate_check<not_within<Geometry>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(not_within<Geometry> const& p, Value const&, Indexable const& i)
- {
- return !geometry::within(i, p.geometry);
- }
-};
-
-// predicates check
-
-template <typename TuplePredicates, typename Tag, unsigned int N>
-struct predicates_check_tuple
-{
- template <typename Value, typename Indexable>
- static inline bool apply(TuplePredicates const& p, Value const& v, Indexable const& i)
- {
- return predicates_check_tuple<TuplePredicates, Tag, N - 1>::apply(p, v, i)
- && predicate_check<
- typename boost::tuples::element<N - 1, TuplePredicates>::type,
- Tag
- >::apply(boost::get<N - 1>(p), v, i);
- }
-};
-
-template <typename TuplePredicates, typename Tag>
-struct predicates_check_tuple<TuplePredicates, Tag, 1>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(TuplePredicates const& p, Value const& v, Indexable const& i)
- {
- return predicate_check<
- typename boost::tuples::element<0, TuplePredicates>::type,
- Tag
- >::apply(boost::get<0>(p), v, i);
- }
-};
-
-template <typename Predicate, typename Tag>
-struct predicates_check_impl
-{
- template <typename Value, typename Indexable>
- static inline bool apply(Predicate const& p, Value const& v, Indexable const& i)
- {
- return predicate_check<Predicate, Tag>::apply(p, v, i);
- }
-};
-
-template <typename Predicate1, typename Predicate2, typename Tag>
-struct predicates_check_impl<std::pair<Predicate1, Predicate2>, Tag>
-{
- template <typename Value, typename Indexable>
- static inline bool apply(std::pair<Predicate1, Predicate2> const& p, Value const& v, Indexable const& i)
- {
- return predicate_check<Predicate1, Tag>::apply(p.first, v, i)
- && predicate_check<Predicate2, Tag>::apply(p.second, v, i);
- }
-};
-
-template <
- typename T0, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9,
- typename Tag
->
-struct predicates_check_impl<
- boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
- Tag
->
-{
- typedef boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> predicates_type;
-
- template <typename Value, typename Indexable>
- static inline bool apply(predicates_type const& p, Value const& v, Indexable const& i)
- {
- return predicates_check_tuple<
- predicates_type,
- Tag,
- boost::tuples::length<predicates_type>::value
- >::apply(p, v, i);
- }
-};
-
-template <typename Tag, typename Predicates, typename Value, typename Indexable>
-inline bool predicates_check(Predicates const& p, Value const& v, Indexable const& i)
-{
- return detail::predicates_check_impl<Predicates, Tag>
- ::apply(p, v, i);
-}
-
-} // namespace detail
-
 }}} // namespace boost::geometry::index
 
 // operator! generators

Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/pushable_array.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,171 +0,0 @@
-// Boost.Geometry Index
-//
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-//
-// Use, modification and distribution is subject to 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)
-
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP
-
-#include <boost/array.hpp>
-
-#include <boost/geometry/extensions/index/assert.hpp>
-
-namespace boost { namespace geometry { namespace index {
-
-template <typename Element, size_t Capacity>
-class pushable_array
-{
- typedef typename boost::array<Element, Capacity> array_type;
-
-public:
- typedef typename array_type::value_type value_type;
- typedef typename array_type::size_type size_type;
- typedef typename array_type::iterator iterator;
- typedef typename array_type::const_iterator const_iterator;
- typedef typename array_type::reverse_iterator reverse_iterator;
- typedef typename array_type::const_reverse_iterator const_reverse_iterator;
- typedef typename array_type::reference reference;
- typedef typename array_type::const_reference const_reference;
-
- inline pushable_array()
- : m_size(0)
- {}
-
- inline explicit pushable_array(size_type s)
- : m_size(s)
- {
- BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
- }
-
- inline void resize(size_type s)
- {
- BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
- 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");
- return m_array[i];
- }
-
- inline Element const& operator[](size_type i) const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(i < m_size, "index of the element outside the container");
- return m_array[i];
- }
-
- inline Element const& front() const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return m_array.front();
- }
-
- inline Element & front()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return m_array.front();
- }
-
- inline Element const& back() const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return *(begin() + (m_size - 1));
- }
-
- inline Element & back()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return *(begin() + (m_size - 1));
- }
-
- inline iterator begin()
- {
- return m_array.begin();
- }
-
- inline iterator end()
- {
- return m_array.begin() + m_size;
- }
-
- inline const_iterator begin() const
- {
- return m_array.begin();
- }
-
- inline const_iterator end() const
- {
- return m_array.begin() + m_size;
- }
-
- inline reverse_iterator rbegin()
- {
- return reverse_iterator(end());
- }
-
- inline reverse_iterator rend()
- {
- return reverse_iterator(begin());
- }
-
- inline const_reverse_iterator rbegin() const
- {
- return const_reverse_iterator(end());
- }
-
- inline const_reverse_iterator rend() const
- {
- return const_reverse_iterator(begin());
- }
-
- inline void clear()
- {
- m_size = 0;
- }
-
- inline void push_back(Element const& v)
- {
- BOOST_GEOMETRY_INDEX_ASSERT(m_size < Capacity, "can't further increase the size of the container");
- m_array[m_size] = v;
- ++m_size;
- }
-
- inline void pop_back()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- --m_size;
- }
-
- inline bool empty() const
- {
- return m_size == 0;
- }
-
- inline size_t size() const
- {
- return m_size;
- }
-
- inline size_t capacity() const
- {
- return Capacity;
- }
-
-private:
- boost::array<Element, Capacity> m_array;
- size_type m_size;
-};
-
-}}} // namespace boost::geometry::index
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_PUSHABLE_ARRAY_HPP

Added: sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/boost/geometry/extensions/index/rtree.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,1632 @@
+// Boost.Geometry Index
+//
+// R-tree implementation
+//
+// Copyright (c) 2008 Federico J. Fernandez.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+//
+// Use, modification and distribution is subject to 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)
+
+#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_HPP
+
+#include <algorithm>
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/move/move.hpp>
+
+#include <boost/geometry/geometry.hpp>
+
+#include <boost/geometry/extensions/index/detail/assert.hpp>
+#include <boost/geometry/extensions/index/detail/nonassignable.hpp>
+
+#include <boost/geometry/extensions/index/translator/translator.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/options.hpp>
+
+#include <boost/geometry/extensions/index/predicates.hpp>
+#include <boost/geometry/extensions/index/distance_predicates.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/adaptors.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/node/node.hpp>
+
+#include <boost/geometry/extensions/index/algorithms/is_valid.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/visitors/insert.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/remove.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/copy.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/destroy.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/spatial_query.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/nearest_query.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/count.hpp>
+
+#include <boost/geometry/extensions/index/detail/rtree/linear/linear.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/quadratic/quadratic.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/rstar/rstar.hpp>
+//#include <boost/geometry/extensions/index/detail/rtree/kmeans/kmeans.hpp>
+
+#include <boost/geometry/extensions/index/inserter.hpp>
+
+// TODO change the name to bounding_tree
+
+/*!
+\defgroup rtree_functions Functions related to the rtree
+*/
+
+namespace boost { namespace geometry { namespace index {
+
+/*!
+\brief The R-tree spatial index.
+
+This is self-balancing spatial index capable to store various types of Values and balancing algorithms.
+
+\par Parameters
+The user must pass a type defining the Parameters which will
+be used in rtree creation process. This type is used e.g. to specify balancing algorithm
+with specific parameters like min and max number of elements in node.
+
+\par
+Predefined algorithms with compile-time parameters are:
+\li <tt>boost::geometry::index::linear</tt>,
+ \li <tt>boost::geometry::index::quadratic</tt>,
+ \li <tt>boost::geometry::index::rstar</tt>.
+
+\par
+Predefined algorithms with run-time parameters are:
+ \li \c boost::geometry::index::runtime::linear,
+ \li \c boost::geometry::index::runtime::quadratic,
+ \li \c boost::geometry::index::runtime::rstar.
+
+\par Translator
+The Translator translates from Value to Indexable each time r-tree requires it. Which means that this
+operation is done for each Value access. Therefore the Translator should return the Indexable by
+const reference instead of a value. Default translator can translate all types adapted to Point
+or Box concepts (called Indexables). It also handles <tt>std::pair<Indexable, T></tt> and
+<tt>boost::tuple<Indexable, ...></tt>. For example, if <tt>std::pair<Box, int></tt> is stored in the
+container, the default translator translates from <tt>std::pair<Box, int> const&</tt> to <tt>Box const&</tt>.
+
+\tparam Value The type of objects stored in the container.
+\tparam Parameters Compile-time parameters.
+\tparam Translator The type of the translator which translates from Value to Indexable.
+\tparam Allocator The allocator used to allocate/deallocate memory, construct/destroy nodes and Values.
+*/
+template <
+ typename Value,
+ typename Parameters,
+ typename Translator = translator::def<Value>,
+ typename Allocator = std::allocator<Value>
+>
+class rtree
+{
+ BOOST_COPYABLE_AND_MOVABLE(rtree)
+
+public:
+ /*! \brief The type of Value stored in the container. */
+ typedef Value value_type;
+ /*! \brief R-tree parameters type. */
+ typedef Parameters parameters_type;
+ /*! \brief Value to Indexable Translator type. */
+ typedef Translator translator_type;
+ /*! \brief The type of allocator used by the container. */
+ typedef Allocator allocator_type;
+ /*! \brief Unsigned integral type used by the container. */
+ typedef typename allocator_type::size_type size_type;
+
+ /*! \brief The Indexable type to which Value is translated. */
+ typedef typename translator::indexable_type<Translator>::type indexable_type;
+ /*! \brief The Box type used by the R-tree. */
+ typedef typename index::default_box_type<indexable_type>::type box_type;
+
+#if !defined(BOOST_GEOMETRY_INDEX_ENABLE_DEBUG_INTERFACE)
+private:
+#endif
+ typedef typename detail::rtree::options_type<Parameters>::type options_type;
+ typedef typename options_type::node_tag node_tag;
+ typedef detail::rtree::allocators<allocator_type, value_type, typename options_type::parameters_type, box_type, node_tag> allocators_type;
+
+ typedef typename detail::rtree::node<value_type, typename options_type::parameters_type, box_type, allocators_type, node_tag>::type node;
+ 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;
+
+public:
+ /*!
+ \brief The constructor.
+
+ \param parameters The parameters object.
+ \param translator The translator object.
+
+ \par Throws
+ If allocator default constructor throws.
+ */
+ inline explicit rtree(parameters_type parameters = parameters_type(),
+ translator_type const& translator = translator_type())
+ : m_translator(translator) // SHOULDN'T THROW
+ , m_parameters(parameters)
+ , m_allocators()
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ {
+ geometry::assign_inverse(m_box);
+ }
+
+ /*!
+ \brief The constructor.
+
+ \param parameters The parameters object.
+ \param translator The translator object.
+ \param allocator The allocator object.
+
+ \par Throws
+ If allocator copy constructor throws.
+ */
+ inline rtree(parameters_type parameters,
+ translator_type const& translator,
+ allocator_type allocator)
+ : m_translator(translator) // SHOULDN'T THROW
+ , m_parameters(parameters)
+ , m_allocators(allocator)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ {
+ geometry::assign_inverse(m_box);
+ }
+
+ /*!
+ \brief The constructor.
+
+ \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.
+
+ \par Throws
+ \li If allocator copy constructor throws.
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When memory allocation for Node fails.
+ */
+ template<typename Iterator>
+ inline rtree(Iterator first, Iterator last,
+ parameters_type parameters = parameters_type(),
+ translator_type const& translator = translator_type(),
+ allocator_type allocator = allocator_type())
+ : m_translator(translator) // SHOULDN'T THROW
+ , m_parameters(parameters)
+ , m_allocators(allocator)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ {
+ geometry::assign_inverse(m_box);
+
+ try
+ {
+ this->insert(first, last);
+ }
+ catch(...)
+ {
+ this->raw_destroy(*this);
+ throw;
+ }
+ }
+
+ /*!
+ \brief The constructor.
+
+ \param rng The range of Values.
+ \param parameters The parameters object.
+ \param translator The translator object.
+ \param allocator The allocator object.
+
+ \par Throws
+ \li If allocator copy constructor throws.
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When memory allocation for Node fails.
+ */
+ template<typename Range>
+ inline explicit rtree(Range const& rng,
+ parameters_type parameters = parameters_type(),
+ translator_type const& translator = translator_type(),
+ allocator_type allocator = allocator_type())
+ : m_translator(translator) // SHOULDN'T THROW
+ , m_parameters(parameters)
+ , m_allocators(allocator)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ {
+ geometry::assign_inverse(m_box);
+
+ try
+ {
+ this->insert(rng);
+ }
+ catch(...)
+ {
+ this->raw_destroy(*this);
+ throw;
+ }
+ }
+
+ /*!
+ \brief The destructor.
+
+ \par Throws
+ Nothing.
+ */
+ inline ~rtree()
+ {
+ this->raw_destroy(*this);
+ }
+
+ /*!
+ \brief The copy constructor.
+
+ It uses parameters, translator and allocator from the source tree.
+
+ \param src The rtree which content will be copied.
+
+ \par Throws
+ \li If allocator copy constructor throws.
+ \li If Value copy constructor throws.
+ \li If allocation throws.
+ \li When memory allocation for Node fails.
+ */
+ inline rtree(rtree const& src)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
+ , m_parameters(src.m_parameters)
+ , m_allocators(src.m_allocators)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ , m_box(src.m_box)
+ {
+ //TODO use Boost.Container allocator_traits_type::select_on_container_copy_construction()
+ this->raw_copy(src, *this, false);
+ }
+
+ /*!
+ \brief The copy constructor.
+
+ It uses Parameters and translator from the source tree.
+
+ \param src The rtree which content will be copied.
+ \param allocator The allocator which will be used.
+
+ \par Throws
+ \li If allocator copy constructor throws.
+ \li If Value copy constructor throws.
+ \li If allocation throws.
+ \li When memory allocation for Node fails.
+ */
+ inline rtree(rtree const& src, allocator_type const& allocator)
+ : m_translator(src.m_translator) // SHOULDN'T THROW
+ , m_parameters(src.m_parameters)
+ , m_allocators(allocator)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ , m_box(src.m_box)
+ {
+ this->raw_copy(src, *this, false);
+ }
+
+ /*!
+ \brief The moving constructor.
+
+ It uses parameters, translator and allocator from the source tree.
+
+ \param src The rtree which content will be moved.
+
+ \par Throws
+ Nothing.
+ */
+ inline rtree(BOOST_RV_REF(rtree) src)
+// TODO - use boost::move()
+ : m_translator(src.m_translator) // SHOULDN'T THROW
+ , m_parameters(src.m_parameters)
+ , m_allocators(src.m_allocators)
+ , m_values_count(src.m_values_count)
+ , m_leafs_level(src.m_leafs_level)
+ , m_root(src.m_root)
+ , m_box(src.m_box)
+ {
+ src.m_values_count = 0;
+ src.m_leafs_level = 0;
+ src.m_root = 0;
+ }
+
+ /*!
+ \brief The moving constructor.
+
+ It uses parameters and translator from the source tree.
+
+ \param src The rtree which content will be moved.
+ \param allocator The allocator.
+
+ \par Throws
+ \li If allocator copy constructor throws.
+ \li If Value copy constructor throws (only if allocators aren't equal).
+ \li If allocation throws (only if allocators aren't equal).
+ \li When memory allocation for Node fails (only if allocators aren't equal).
+ */
+ inline rtree(BOOST_RV_REF(rtree) src, allocator_type const& allocator)
+// TODO - use boost::move()
+ : m_translator(src.m_translator) // SHOULDN'T THROW
+ , m_parameters(src.m_parameters)
+ , m_allocators(allocator)
+ , m_values_count(0)
+ , m_leafs_level(0)
+ , m_root(0)
+ , m_box(src.m_box)
+ {
+ if ( src.m_allocators.allocator == allocator )
+ {
+ boost::swap(m_values_count, src.m_values_count);
+ boost::swap(m_leafs_level, src.m_leafs_level);
+ boost::swap(m_root, src.m_root);
+ }
+ else
+ {
+ this->raw_copy(src, *this, false);
+ }
+ }
+
+ /*!
+ \brief The assignment operator.
+
+ It uses parameters and translator from the source tree.
+
+ \param src The rtree which content will be copied.
+
+ \par Throws
+ \li If Value copy constructor throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+ */
+ inline rtree & operator=(BOOST_COPY_ASSIGN_REF(rtree) src)
+ {
+ if ( this == &src )
+ return *this;
+
+ //TODO use Boost.Container allocator_traits_type::propagate_on_container_move_assignment
+
+ // It uses m_allocators
+ this->raw_copy(src, *this, true);
+
+ m_box = src.m_box;
+
+ return *this;
+ }
+
+ /*!
+ \brief The moving assignment.
+
+ It uses parameters and translator from the source tree.
+
+ \param src The rtree which content will be moved.
+
+ \par Throws
+ Only if allocators aren't equal.
+ \li If Value copy constructor throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+ */
+ inline rtree & operator=(BOOST_RV_REF(rtree) src)
+ {
+ if ( this == &src )
+ return *this;
+
+//TODO use Boost.Container allocator_traits_type::propagate_on_container_move_assignment
+
+ if ( m_allocators.allocator == src.m_allocators.allocator )
+ {
+// TODO - use boost::move()
+ m_translator = src.m_translator; // SHOULDN'T THROW
+ m_parameters = src.m_parameters;
+ //m_allocators = src.m_allocators;
+
+ m_values_count = src.m_values_count;
+ m_leafs_level = src.m_leafs_level;
+ m_root = src.m_root;
+
+ src.m_values_count = 0;
+ src.m_leafs_level = 0;
+ src.m_root = 0;
+ }
+ else
+ {
+ // It uses m_allocators
+ this->raw_copy(src, *this, true);
+ }
+
+ m_box = src.m_box;
+
+ return *this;
+ }
+
+ /*!
+ \brief Swaps contents of two rtrees.
+
+ Parameters, translator and allocators are swapped as well.
+
+ \param other The rtree which content will be swapped with this rtree content.
+
+ \par Throws
+ If allocators swap throws.
+ */
+ void swap(rtree & other)
+ {
+ boost::swap(m_translator, other.m_translator); // SHOULDN'T THROW
+ boost::swap(m_parameters, other.m_parameters);
+ m_allocators.swap(other.m_allocators);
+
+ boost::swap(m_values_count, other.m_values_count);
+ boost::swap(m_leafs_level, other.m_leafs_level);
+ boost::swap(m_root, other.m_root);
+ boost::swap(m_box, other.m_box);
+ }
+
+ /*!
+ \brief Insert a value to the index.
+
+ \param value The value which will be stored in the container.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ inline void insert(value_type const& value)
+ {
+ if ( !m_root )
+ this->raw_create();
+
+ this->raw_insert(value);
+ }
+
+ /*!
+ \brief Insert a range of values to the index.
+
+ \param first The beginning of the range of values.
+ \param last The end of the range of values.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ template <typename Iterator>
+ inline void insert(Iterator first, Iterator last)
+ {
+ if ( !m_root )
+ this->raw_create();
+
+ for ( ; first != last ; ++first )
+ this->raw_insert(*first);
+ }
+
+ /*!
+ \brief Insert a range of values to the index.
+
+ \param rng The range of values.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ template <typename Range>
+ inline void insert(Range const& rng)
+ {
+ if ( !m_root )
+ this->raw_create();
+
+ typedef typename boost::range_const_iterator<Range>::type It;
+ for ( It it = boost::const_begin(rng); it != boost::const_end(rng) ; ++it )
+ this->raw_insert(*it);
+ }
+
+ /*!
+ \brief Remove a value from the container.
+
+ In contrast to the \c std::set or <tt>std::map erase()</tt> method
+ this method removes only one value from the container.
+
+ \param value The value which will be removed from the container.
+
+ \return 1 if the value was removed, 0 otherwise.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ inline size_type remove(value_type const& value)
+ {
+ return this->raw_remove(value);
+ }
+
+ /*!
+ \brief Remove a range of values from the container.
+
+ In contrast to the \c std::set or <tt>std::map erase()</tt> method
+ it doesn't take iterators pointing to values stored in this container. It removes values equal
+ to these passed as a range. Furthermore this method removes only one value for each one passed
+ in the range, not all equal values.
+
+ \param first The beginning of the range of values.
+ \param last The end of the range of values.
+
+ \return The number of removed values.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ template <typename Iterator>
+ inline size_type remove(Iterator first, Iterator last)
+ {
+ size_type result = 0;
+ for ( ; first != last ; ++first )
+ result += this->raw_remove(*first);
+ return result;
+ }
+
+ /*!
+ \brief Remove a range of values from the container.
+
+ In contrast to the \c std::set or <tt>std::map erase()</tt> method
+ it removes values equal to these passed as a range. Furthermore, this method removes only
+ one value for each one passed in the range, not all equal values.
+
+ \param rng The range of values.
+
+ \return The number of removed values.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If allocation throws.
+ \li When nodes allocation fails.
+
+ \warning
+ This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state,
+ elements must not be inserted or removed, methods may return invalid data.
+ */
+ template <typename Range>
+ inline size_type remove(Range const& rng)
+ {
+ size_type result = 0;
+ typedef typename boost::range_const_iterator<Range>::type It;
+ for ( It it = boost::const_begin(rng); it != boost::const_end(rng) ; ++it )
+ result += this->raw_remove(*it);
+ return result;
+ }
+
+ /*!
+ \brief Finds values meeting spatial predicates, e.g. intersecting some Box.
+
+ <b>Spatial predicates</b> may be a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+
+ It may be generated by one of the functions listed below:
+ \li \c boost::geometry::index::covered_by(),
+ \li \c boost::geometry::index::disjoint(),
+ \li \c boost::geometry::index::intersects() - default,
+ \li \c boost::geometry::index::overlaps(),
+ \li \c boost::geometry::index::within(),
+ \li <tt>! boost::geometry::index::covered_by()</tt>,
+ \li <tt>! boost::geometry::index::disjoint()</tt>,
+ \li <tt>! boost::geometry::index::intersects()</tt>,
+ \li <tt>! boost::geometry::index::overlaps()</tt>,
+ \li <tt>! boost::geometry::index::within()</tt>
+ \li \c boost::geometry::index::value().
+
+ Those predicates may be passed together in
+ \c std::pair or \c boost::tuple.
+
+ \param pred The spatial predicates or a Geometry.
+ \param out_it The output iterator of the result range. E.g. an iterator generated by
+ std::back_inserter(container)
+
+ \return The number of values found.
+
+ \par Throws
+ \li If Value copy constructor or copy assignment throws.
+ \li If OutIter dereference or increment throws.
+ */
+ template <typename Predicates, typename OutIter>
+ inline size_type spatial_query(Predicates const& pred, OutIter out_it) const
+ {
+ if ( !m_root )
+ return 0;
+
+ detail::rtree::visitors::spatial_query<value_type, options_type, translator_type, box_type, allocators_type, Predicates, OutIter>
+ find_v(m_translator, pred, out_it);
+
+ detail::rtree::apply_visitor(find_v, *m_root);
+
+ return find_v.found_count;
+ }
+
+ /*!
+ \brief Finds one value meeting distances predicates, e.g. nearest to some Point.
+
+ <b>Distances predicates</b> may be a \c Point. In this the case the Value closest to \c Point is returned.
+
+ It is possible to define how distance to Value is calculated. This is done by passing PointRelation.
+ It can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest() - default,
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ It is possible to define define distances bounds, for example that some distance must be between
+ min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+ by following functions:
+ \li \c boost::geometry::index::unbounded() - default,
+ \li \c boost::geometry::index::min_bounded(),
+ \li \c boost::geometry::index::max_bounded(),
+ \li \c boost::geometry::index::bounded().
+
+ MinRelation and MaxRelation describes bounds and can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest(),
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ \param dpred The distances predicates or a Point.
+
+ \param v The reference to the object which will contain the result.
+
+ \return The number of values found.
+
+ \par Throws
+ If Value copy constructor or copy assignment throws.
+ */
+ template <typename DistancesPredicates>
+ inline size_type nearest_query(DistancesPredicates const& dpred, value_type & v) const
+ {
+ return raw_nearest_one(dpred, detail::empty(), v);
+ }
+
+ /*!
+ \brief Finds one value meeting distances predicates and spatial predicates,
+ e.g. nearest to some Point and intersecting some Box.
+
+ <b>Distances predicates</b> may be a \c Point. In this the case the Value closest to \c Point is returned.
+
+ It is possible to define how distance to Value is calculated. This is done by passing PointRelation.
+ It can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest() - default,
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ It is possible to define define distances bounds, for example that some distance must be between
+ min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+ by following functions:
+ \li \c boost::geometry::index::unbounded() - default,
+ \li \c boost::geometry::index::min_bounded(),
+ \li \c boost::geometry::index::max_bounded(),
+ \li \c boost::geometry::index::bounded().
+
+ MinRelation and MaxRelation describes bounds and can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest(),
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ <b>Spatial predicates</b> may be a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+
+ It may be generated by one of the functions listed below:
+ \li \c boost::geometry::index::covered_by(),
+ \li \c boost::geometry::index::disjoint(),
+ \li \c boost::geometry::index::intersects() - default,
+ \li \c boost::geometry::index::overlaps(),
+ \li \c boost::geometry::index::within(),
+ \li <tt>! boost::geometry::index::covered_by()</tt>,
+ \li <tt>! boost::geometry::index::disjoint()</tt>,
+ \li <tt>! boost::geometry::index::intersects()</tt>,
+ \li <tt>! boost::geometry::index::overlaps()</tt>,
+ \li <tt>! boost::geometry::index::within()</tt>
+ \li \c boost::geometry::index::value().
+
+ Those predicates may be passed together in
+ \c std::pair or \c boost::tuple.
+
+ \param dpred The distances predicates or a Point.
+ \param pred The spatial predicates or a Geometry
+ \param v The reference to the object which will contain the result.
+
+ \return The number of values found.
+
+ \par Throws
+ If Value copy constructor or copy assignment throws.
+ */
+ template <typename DistancesPredicates, typename Predicates>
+ inline size_type nearest_query(DistancesPredicates const& dpred, Predicates const& pred, value_type & v) const
+ {
+ return raw_nearest_one(dpred, pred, v);
+ }
+
+ /*!
+ \brief Finds k values meeting distances predicates, e.g. k nearest values to some Point.
+
+ <b>Distances predicates</b> may be a \c Point. In this the case the Value closest to \c Point is returned.
+
+ It is possible to define how distance to Value is calculated. This is done by passing PointRelation.
+ It can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest() - default,
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ It is possible to define define distances bounds, for example that some distance must be between
+ min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+ by following functions:
+ \li \c boost::geometry::index::unbounded() - default,
+ \li \c boost::geometry::index::min_bounded(),
+ \li \c boost::geometry::index::max_bounded(),
+ \li \c boost::geometry::index::bounded().
+
+ MinRelation and MaxRelation describes bounds and can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest(),
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ \param dpred The distances predicates or a Point.
+ \param k The max number of values.
+ \param out_it The output iterator of the result range. E.g. a back_insert_iterator.
+
+ \return The number of values found.
+
+ \par Throws
+ If Value copy constructor or copy assignment throws. If OutIter dereference or increment throws.
+ */
+ template <typename DistancesPredicates, typename OutIter>
+ inline size_type nearest_query(DistancesPredicates const& dpred, size_type k, OutIter out_it) const
+ {
+ return raw_nearest_k(dpred, k, detail::empty(), out_it);
+ }
+
+ /*!
+ \brief Finds k values meeting distances predicates and spatial predicates,
+ e.g. k nearest values to some Point and intersecting some Box.
+
+ <b>Distances predicates</b> may be a \c Point. In this the case the Value closest to \c Point is returned.
+
+ It is possible to define how distance to Value is calculated. This is done by passing PointRelation.
+ It can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest() - default,
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ It is possible to define define distances bounds, for example that some distance must be between
+ min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+ by following functions:
+ \li \c boost::geometry::index::unbounded() - default,
+ \li \c boost::geometry::index::min_bounded(),
+ \li \c boost::geometry::index::max_bounded(),
+ \li \c boost::geometry::index::bounded().
+
+ MinRelation and MaxRelation describes bounds and can be generated by following functions:
+ \li \c boost::geometry::index::to_nearest(),
+ \li \c boost::geometry::index::to_centroid(),
+ \li \c boost::geometry::index::to_furthest().
+
+ <b>Spatial predicates</b> may be a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+
+ It may be generated by one of the functions listed below:
+ \li \c boost::geometry::index::covered_by(),
+ \li \c boost::geometry::index::disjoint(),
+ \li \c boost::geometry::index::intersects() - default,
+ \li \c boost::geometry::index::overlaps(),
+ \li \c boost::geometry::index::within(),
+ \li <tt>! boost::geometry::index::covered_by()</tt>,
+ \li <tt>! boost::geometry::index::disjoint()</tt>,
+ \li <tt>! boost::geometry::index::intersects()</tt>,
+ \li <tt>! boost::geometry::index::overlaps()</tt>,
+ \li <tt>! boost::geometry::index::within()</tt>
+ \li \c boost::geometry::index::value().
+
+ Those predicates may be passed together in
+ \c std::pair or \c boost::tuple.
+
+ \param dpred The distances predicates or a Point
+ \param k The max number of values.
+ \param pred The spatial predicates or a Geometry.
+ \param out_it The output iterator of the result range. E.g. a back_insert_iterator.
+
+ \return The number of values found.
+
+ \par Throws
+ If Value copy constructor or copy assignment throws. If OutIter dereference or increment throws.
+ */
+ template <typename DistancesPredicates, typename Predicates, typename OutIter>
+ inline size_type nearest_query(DistancesPredicates const& dpred, size_type k, Predicates const& pred, OutIter out_it) const
+ {
+ return raw_nearest_k(dpred, k, pred, out_it);
+ }
+
+ /*!
+ \brief Returns the number of stored values.
+
+ \return The number of stored values.
+
+ \par Throws
+ Nothing.
+ */
+ inline size_type size() const
+ {
+ return m_values_count;
+ }
+
+ /*!
+ \brief Query if the container is empty.
+
+ \return true if the container is empty.
+
+ \par Throws
+ Nothing.
+ */
+ inline bool empty() const
+ {
+ return 0 == m_values_count;
+ }
+
+ /*!
+ \brief Removes all values stored in the container.
+
+ \par Throws
+ Nothing.
+ */
+ inline void clear()
+ {
+ this->raw_destroy(*this);
+ geometry::assign_inverse(m_box);
+ }
+
+ /*!
+ \brief Returns the box containing all values stored in the container.
+
+ Returns the box containing all values stored in the container.
+ If the container is empty the result of \c geometry::assign_inverse() is returned.
+
+ \return The box containing all values stored in the container or an invalid box if
+ there are no values in the container.
+
+ \par Throws
+ Nothing.
+ */
+ inline box_type const& box() const
+ {
+ return m_box;
+ }
+
+ /*!
+ \brief Count Values or Indexables stored in the container.
+
+ For indexable_type it returns the number of values which indexables equals the parameter.
+ For value_type it returns the number of values which equals the parameter.
+
+ \param vori The value or indexable which will be counted.
+
+ \return The number of values found.
+
+ \par Throws
+ Nothing.
+ */
+ template <typename ValueOrIndexable>
+ size_type count(ValueOrIndexable const& vori) const
+ {
+ if ( !m_root )
+ return 0;
+
+ detail::rtree::visitors::count<ValueOrIndexable, value_type, options_type, translator_type, box_type, allocators_type>
+ count_v(vori, m_translator);
+
+ detail::rtree::apply_visitor(count_v, *m_root);
+
+ return count_v.found_count;
+ }
+
+ /*!
+ \brief Returns parameters.
+
+ \return The parameters object.
+
+ \par Throws
+ Nothing.
+ */
+ inline parameters_type const& parameters() const
+ {
+ return m_parameters;
+ }
+
+ /*!
+ \brief Returns the translator object.
+
+ \return The translator object.
+
+ \par Throws
+ Nothing.
+ */
+ inline translator_type const& translator() const
+ {
+ return m_translator;
+ }
+
+ /*!
+ \brief Returns allocator used by the rtree.
+
+ \return The allocator.
+
+ \par Throws
+ If allocator copy constructor throws.
+ */
+ allocator_type get_allocator() const
+ {
+ return m_allocators.allocator;
+ }
+
+#if !defined(BOOST_GEOMETRY_INDEX_ENABLE_DEBUG_INTERFACE)
+private:
+#endif
+ /*!
+ \brief Apply a visitor to the nodes structure in order to perform some operator.
+
+ This function is not a part of the 'official' interface. However it makes
+ possible e.g. to pass a visitor drawing the tree structure.
+
+ \param visitor The visitor object.
+
+ \par Throws
+ If Visitor::operator() throws.
+ */
+ template <typename Visitor>
+ inline void apply_visitor(Visitor & visitor) const
+ {
+ if ( m_root )
+ detail::rtree::apply_visitor(visitor, *m_root);
+ }
+
+ /*!
+ \brief Returns the number of stored objects. Same as size().
+
+ This function is not a part of the 'official' interface.
+
+ \return The number of stored objects.
+
+ \par Throws
+ Nothing.
+ */
+ inline size_type values_count() const
+ {
+ return m_values_count;
+ }
+
+ /*!
+ \brief Returns the depth of the R-tree.
+
+ This function is not a part of the 'official' interface.
+
+ \return The depth of the R-tree.
+
+ \par Throws
+ Nothing.
+ */
+ inline size_type depth() const
+ {
+ return m_leafs_level;
+ }
+
+private:
+ /*!
+ \pre Root node must exist - m_root != 0.
+
+ \brief Insert a value to the index.
+
+ \param value The value which will be stored in the container.
+
+ \par Exception-safety
+ basic
+ */
+ inline void raw_insert(value_type const& value)
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(m_root, "The root must exist");
+ BOOST_GEOMETRY_INDEX_ASSERT(index::is_valid(m_translator(value)), "Indexable is invalid");
+
+ geometry::expand(m_box, m_translator(value));
+
+ detail::rtree::visitors::insert<
+ value_type,
+ value_type, options_type, translator_type, box_type, allocators_type,
+ typename options_type::insert_tag
+ > insert_v(m_root, m_leafs_level, value, m_parameters, m_translator, m_allocators);
+
+ detail::rtree::apply_visitor(insert_v, *m_root);
+
+// TODO
+// Think about this: If exception is thrown, may the root be removed?
+// Or it is just cleared?
+
+// TODO
+// If exception is thrown, m_values_count may be invalid
+ ++m_values_count;
+ }
+
+ /*!
+ \brief Remove the value from the container.
+
+ \param value The value which will be removed from the container.
+
+ \par Exception-safety
+ basic
+ */
+ inline size_type raw_remove(value_type const& value)
+ {
+ // TODO: awulkiew - assert for correct value (indexable) ?
+ BOOST_GEOMETRY_INDEX_ASSERT(m_root, "The root must exist");
+
+ detail::rtree::visitors::remove<
+ value_type, options_type, translator_type, box_type, allocators_type
+ > remove_v(m_root, m_leafs_level, m_box, value, m_parameters, m_translator, m_allocators);
+
+ detail::rtree::apply_visitor(remove_v, *m_root);
+
+ // If exception is thrown, m_values_count may be invalid
+
+ if ( remove_v.is_value_removed() )
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 < m_values_count, "unexpected state");
+
+ --m_values_count;
+
+ return 1;
+ }
+
+ return 0;
+ }
+
+ /*!
+ \brief Create an empty R-tree i.e. new empty root node and clear other attributes.
+
+ \par Exception-safety
+ strong
+ */
+ inline void raw_create()
+ {
+ BOOST_GEOMETRY_INDEX_ASSERT(0 == m_root, "the tree is already created");
+
+ m_root = detail::rtree::create_node<allocators_type, leaf>::apply(m_allocators); // MAY THROW (N: alloc)
+ m_values_count = 0;
+ m_leafs_level = 0;
+ }
+
+ /*!
+ \brief Destroy the R-tree i.e. all nodes and clear attributes.
+
+ \param t The container which is going to be destroyed.
+
+ \par Exception-safety
+ nothrow
+ */
+ inline void raw_destroy(rtree & t)
+ {
+ if ( t.m_root )
+ {
+ detail::rtree::visitors::destroy<value_type, options_type, translator_type, box_type, allocators_type> del_v(t.m_root, t.m_allocators);
+ detail::rtree::apply_visitor(del_v, *t.m_root);
+
+ t.m_root = 0;
+ }
+ t.m_values_count = 0;
+ t.m_leafs_level = 0;
+ }
+
+ /*!
+ \brief Copy the R-tree i.e. whole nodes structure, values and other attributes.
+ It uses destination's allocators to create the new structure.
+
+ \param src The source R-tree.
+ \param dst The destination R-tree.
+
+ \par Exception-safety
+ strong
+ */
+ inline void raw_copy(rtree const& src, rtree & dst, bool copy_all_internals) const
+ {
+ detail::rtree::visitors::copy<value_type, options_type, translator_type, box_type, allocators_type> copy_v(dst.m_allocators);
+
+ if ( src.m_root )
+ detail::rtree::apply_visitor(copy_v, *src.m_root); // MAY THROW (V, E: alloc, copy, N: alloc)
+
+ if ( copy_all_internals )
+ {
+ dst.m_translator = src.m_translator; // SHOULDN'T THROW
+
+ dst.m_parameters = src.m_parameters;
+ //dst.m_allocators = dst.m_allocators;
+ }
+
+ if ( dst.m_root )
+ {
+ detail::rtree::visitors::destroy<value_type, options_type, translator_type, box_type, allocators_type> del_v(dst.m_root, dst.m_allocators);
+ detail::rtree::apply_visitor(del_v, *dst.m_root);
+ dst.m_root = 0;
+ }
+
+ dst.m_root = copy_v.result;
+ dst.m_values_count = src.m_values_count;
+ dst.m_leafs_level = src.m_leafs_level;
+ }
+
+ /*!
+ \brief Find one value meeting distances and spatial predicates.
+
+ \par Exception-safety
+ strong
+ */
+ template <typename DistancesPredicates, typename Predicates>
+ inline size_type raw_nearest_one(DistancesPredicates const& dpred, Predicates const& pred, value_type & v) const
+ {
+ if ( !m_root )
+ return 0;
+
+ typedef typename detail::point_relation<DistancesPredicates>::type point_relation;
+ typedef typename detail::relation<point_relation>::value_type point_type;
+
+ typedef detail::rtree::visitors::nearest_query_result_one<
+ value_type,
+ translator_type,
+ point_type
+ > result_type;
+
+ result_type result(v);
+
+ detail::rtree::visitors::nearest_query<
+ value_type,
+ options_type,
+ translator_type,
+ box_type,
+ allocators_type,
+ DistancesPredicates,
+ Predicates,
+ result_type
+ > nearest_v(m_parameters, m_translator, dpred, pred, result);
+
+ detail::rtree::apply_visitor(nearest_v, *m_root);
+
+ return result.finish();
+ }
+
+ /*!
+ \brief Find k values meeting distances and spatial predicates.
+
+ \par Exception-safety
+ strong
+ */
+ template <typename DistancesPredicates, typename Predicates, typename OutIter>
+ inline size_type raw_nearest_k(DistancesPredicates const& dpred, size_t k, Predicates const& pred, OutIter out_it) const
+ {
+ if ( !m_root )
+ return 0;
+
+ typedef typename detail::point_relation<DistancesPredicates>::type point_relation;
+ typedef typename detail::relation<point_relation>::value_type point_type;
+
+ typedef detail::rtree::visitors::nearest_query_result_k<
+ value_type,
+ translator_type,
+ point_type,
+ OutIter
+ > result_type;
+
+ result_type result(k, out_it);
+
+ detail::rtree::visitors::nearest_query<
+ value_type,
+ options_type,
+ translator_type,
+ box_type,
+ allocators_type,
+ DistancesPredicates,
+ Predicates,
+ result_type
+ > nearest_v(m_parameters, m_translator, dpred, pred, result);
+
+ detail::rtree::apply_visitor(nearest_v, *m_root);
+
+ return result.finish();
+ }
+
+ translator_type m_translator;
+ Parameters m_parameters;
+ allocators_type m_allocators;
+
+ size_type m_values_count;
+ size_type m_leafs_level;
+ node * m_root;
+
+ box_type m_box;
+};
+
+/*!
+\brief Insert a value to the index.
+
+It calls <tt>rtree::insert(value_type const&)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param v The value which will be stored in the index.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Value const& v)
+{
+ tree.insert(v);
+}
+
+/*!
+\brief Insert a range of values to the index.
+
+It calls <tt>rtree::insert(Iterator, Iterator)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param first The beginning of the range of values.
+\param last The end of the range of values.
+*/
+template<typename Value, typename Options, typename Translator, typename Allocator, typename Iterator>
+inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Iterator first, Iterator last)
+{
+ tree.insert(first, last);
+}
+
+/*!
+\brief Insert a range of values to the index.
+
+It calls <tt>rtree::insert(Range const&)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param rng The range of values.
+*/
+template<typename Value, typename Options, typename Translator, typename Allocator, typename Range>
+inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Range const& rng)
+{
+ tree.insert(rng);
+}
+
+/*!
+\brief Remove a value from the container.
+
+Remove a value from the container. In contrast to the \c std::set or <tt>std::map erase()</tt> method
+this function removes only one value from the container.
+
+It calls <tt>rtree::remove(value_type const&)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param v The value which will be removed from the index.
+
+\return 1 if value was removed, 0 otherwise.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline typename rtree<Value, Options, Translator, Allocator>::size_type
+remove(rtree<Value, Options, Translator, Allocator> & tree, Value const& v)
+{
+ return tree.remove(v);
+}
+
+/*!
+\brief Remove a range of values from the container.
+
+Remove a range of values from the container. In contrast to the \c std::set or <tt>std::map erase()</tt> method
+it doesn't take iterators pointing to values stored in this container. It removes values equal
+to these passed as a range. Furthermore this function removes only one value for each one passed
+in the range, not all equal values.
+
+It calls <tt>rtree::remove(Iterator, Iterator)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param first The beginning of the range of values.
+\param last The end of the range of values.
+
+\return The number of removed values.
+*/
+template<typename Value, typename Options, typename Translator, typename Allocator, typename Iterator>
+inline typename rtree<Value, Options, Translator, Allocator>::size_type
+remove(rtree<Value, Options, Translator, Allocator> & tree, Iterator first, Iterator last)
+{
+ return tree.remove(first, last);
+}
+
+/*!
+\brief Remove a range of values from the container.
+
+Remove a range of values from the container. In contrast to the \c std::set or <tt>std::map erase()</tt> method
+it removes values equal to these passed as a range. Furthermore this method removes only
+one value for each one passed in the range, not all equal values.
+
+It calls <tt>rtree::remove(Range const&)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param rng The range of values.
+
+\return The number of removed values.
+*/
+template<typename Value, typename Options, typename Translator, typename Allocator, typename Range>
+inline typename rtree<Value, Options, Translator, Allocator>::size_type
+remove(rtree<Value, Options, Translator, Allocator> & tree, Range const& rng)
+{
+ return tree.remove(rng);
+}
+
+/*!
+\brief Find values meeting spatial predicates.
+
+It calls \c rtree::spatial_query with parameters <tt>(Predicates const&, OutIter)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param pred The spatial predicates.
+\param out_it The output iterator of the result range.
+
+\return The number of found values.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator, typename Predicates, typename OutIter>
+inline size_t spatial_query(rtree<Value, Options, Translator, Allocator> const& tree, Predicates const& pred, OutIter out_it)
+{
+ return tree.spatial_query(pred, out_it);
+}
+
+/*!
+\brief Find the value meeting distances predicates.
+
+It calls \c rtree::nearest_query with parameters <tt>(DistancesPredicates const& dpred, value_type & v)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param dpred The distances predicates.
+\param v The result.
+
+\return The number of found values.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator, typename DistancesPredicates>
+inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const& tree, DistancesPredicates const& dpred, Value & v)
+{
+ return tree.nearest_query(dpred, v);
+}
+
+/*!
+\brief Find the value meeting distances and spatial predicates.
+
+It calls \c rtree::nearest_query with parameters <tt>(DistancesPredicates const& dpred, Predicates const& pred, value_type & v)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param dpred The distances predicates.
+\param pred The spatial predicates.
+\param v The result.
+
+\return The number of found values.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator, typename DistancesPredicates, typename Predicates>
+inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const& tree, DistancesPredicates const& dpred, Predicates const& pred, Value & v)
+{
+ return tree.nearest_query(dpred, pred, v);
+}
+
+/*!
+\brief Find k values meeting distances predicates.
+
+It calls \c rtree::nearest_query with parameters <tt>(DistancesPredicates const & dpred, size_type k, OutIter out_it)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param dpred The distances predicates.
+\param k The max number of values.
+\param out_it The output iterator of the result range.
+
+\return The number of found values.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator, typename DistancesPredicates, typename OutIter>
+inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const& tree, DistancesPredicates const& dpred, typename rtree<Value, Options, Translator, Allocator>::size_type k, OutIter out_it)
+{
+ return tree.nearest_query(dpred, k, out_it);
+}
+
+/*!
+\brief Find k values meeting distances and spatial predicates.
+
+It calls \c rtree::nearest_query with parameters <tt>(DistancesPredicates const & dpred, size_type k, Predicates const & pred, OutIter out_it)</tt>.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param dpred The distances predicates.
+\param k The max number of values.
+\param pred The spatial predicates.
+\param out_it The output iterator of the result range.
+
+\return The number of found values.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator, typename DistancesPredicates, typename Predicates, typename OutIter>
+inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const& tree, DistancesPredicates const& dpred, typename rtree<Value, Options, Translator, Allocator>::size_type k, Predicates const& pred, OutIter out_it)
+{
+ return tree.nearest_query(dpred, k, pred, out_it);
+}
+
+/*!
+\brief Remove all values from the index.
+
+It calls \c rtree::clear().
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline void clear(rtree<Value, Options, Translator, Allocator> & tree)
+{
+ return tree.clear();
+}
+
+/*!
+\brief Get the number of values stored in the index.
+
+It calls \c rtree::size().
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+
+\return The number of values stored in the index.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline size_t size(rtree<Value, Options, Translator, Allocator> const& tree)
+{
+ return tree.size();
+}
+
+/*!
+\brief Query if there are no values stored in the index.
+
+It calls \c rtree::empty().
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+
+\return true if there are no values in the index.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline bool empty(rtree<Value, Options, Translator, Allocator> const& tree)
+{
+ return tree.empty();
+}
+
+/*!
+\brief Get the box containing all stored values or an invalid box if the index has no values.
+
+It calls \c rtree::box().
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+
+\return The box containing all stored values or an invalid box.
+*/
+template <typename Value, typename Options, typename Translator, typename Allocator>
+inline typename rtree<Value, Options, Translator, Allocator>::box_type const&
+box(rtree<Value, Options, Translator, Allocator> const& tree)
+{
+ return tree.box();
+}
+
+}}} // namespace boost::geometry::index
+
+// Rtree adaptation to Box concept
+
+namespace boost { namespace geometry {
+
+// Traits specializations for box above
+#ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS
+namespace traits
+{
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator>
+struct tag< index::rtree<Value, Parameters, Translator, Allocator> >
+{
+ typedef box_tag type;
+};
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator>
+struct point_type< index::rtree<Value, Parameters, Translator, Allocator> >
+{
+ typedef typename geometry::point_type<
+ typename index::rtree<Value, Parameters, Translator, Allocator>::box_type
+ >::type type;
+};
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator, std::size_t Dimension>
+struct indexed_access<index::rtree<Value, Parameters, Translator, Allocator>, min_corner, Dimension>
+{
+ typedef typename geometry::coordinate_type<
+ typename geometry::point_type<
+ index::rtree<Value, Parameters, Translator, Allocator>
+ >::type
+ >::type coordinate_type;
+
+ static inline coordinate_type get(index::rtree<Value, Parameters, Translator, Allocator> const& tree)
+ {
+ return geometry::get<min_corner, Dimension>(tree.box());
+ }
+
+ static inline void set(index::rtree<Value, Parameters, Translator, Allocator> & tree,
+ coordinate_type const& value)
+ {
+ return geometry::set<min_corner, Dimension>(tree.box(), value);
+ }
+};
+
+template <typename Value, typename Parameters, typename Translator, typename Allocator, std::size_t Dimension>
+struct indexed_access<index::rtree<Value, Parameters, Translator, Allocator>, max_corner, Dimension>
+{
+ typedef typename geometry::coordinate_type<
+ typename geometry::point_type<
+ index::rtree<Value, Parameters, Translator, Allocator>
+ >::type
+ >::type coordinate_type;
+
+ static inline coordinate_type get(index::rtree<Value, Parameters, Translator, Allocator> const& tree)
+ {
+ return geometry::get<max_corner, Dimension>(tree.box());
+ }
+
+ static inline void set(index::rtree<Value, Parameters, Translator, Allocator> & tree,
+ coordinate_type const& value)
+ {
+ return geometry::set<max_corner, Dimension>(tree.box(), value);
+ }
+};
+
+} // namespace traits
+#endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS
+
+}} //namespace boost::geometry
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_HPP

Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/static_vector.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,806 +0,0 @@
-// Boost.Geometry Index
-//
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-//
-// Use, modification and distribution is subject to 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)
-
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP
-
-#include <cstddef>
-#include <stdexcept>
-
-#include <boost/aligned_storage.hpp>
-#include <boost/iterator/reverse_iterator.hpp>
-
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/or.hpp>
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/aligned_storage.hpp>
-#include <boost/type_traits/has_trivial_assign.hpp>
-#include <boost/type_traits/has_trivial_copy.hpp>
-#include <boost/type_traits/has_trivial_constructor.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-
-#include <boost/geometry/extensions/index/assert.hpp>
-
-namespace boost { namespace geometry { namespace index {
-
-template <typename Value, size_t Capacity>
-class static_vector
-{
- BOOST_MPL_ASSERT_MSG(
- (0 < Capacity),
- INVALID_CAPACITY,
- (static_vector));
-
-public:
- typedef Value value_type;
- typedef std::size_t size_type;
- typedef Value& reference;
- typedef Value const& const_reference;
- typedef Value * pointer;
- typedef const Value* const_pointer;
- typedef Value* iterator;
- typedef const Value * const_iterator;
- typedef boost::reverse_iterator<iterator> reverse_iterator;
- typedef boost::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef typename boost::iterator_difference<iterator>::type difference_type;
-
- // nothrow
- static_vector()
- : m_size(0)
- {}
-
- // strong
- explicit static_vector(size_type count)
- : m_size(0)
- {
- resize(count); // may throw
- }
-
- // strong
- static_vector(size_type count, value_type const& value)
- : m_size(0)
- {
- resize(count, value); // may throw
- }
-
- // strong
- static_vector(static_vector const& other)
- : m_size(other.m_size)
- {
- this->uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw
- }
-
- // strong
- template <size_t C>
- static_vector(static_vector<value_type, C> const& other)
- : m_size(other.m_size)
- {
- check_capacity(other.m_size);
-
- this->uninitialized_copy(other.begin(), other.end(), this->begin()); // may throw
- }
-
- // strong
- template <typename Iterator>
- static_vector(Iterator first, Iterator last)
- : m_size(0)
- {
- assign(first, last); // may throw
- }
-
- // basic
- static_vector & operator=(static_vector const& other)
- {
- assign(other.begin(), other.end()); // may throw
-
- return *this;
- }
-
- // basic
- template <size_t C>
- static_vector & operator=(static_vector<value_type, C> const& other)
- {
- assign(other.begin(), other.end()); // may throw
-
- return *this;
- }
-
- // nothrow
- ~static_vector()
- {
- this->destroy(this->begin(), this->end());
- }
-
- // strong
- void resize(size_type count)
- {
- if ( count < m_size )
- {
- this->destroy(this->begin() + count, this->end());
- }
- else
- {
- check_capacity(count);
-
- this->construct(this->end(), this->begin() + count); // may throw
- }
- m_size = count; // update end
- }
-
- // strong
- void resize(size_type count, value_type const& value)
- {
- if ( count < m_size )
- {
- this->destroy(this->begin() + count, this->end());
- }
- else
- {
- check_capacity(count);
-
- std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
- }
- m_size = count; // update end
- }
-
- // nothrow
- void reserve(size_type count)
- {
- check_capacity(count);
- }
-
- // strong
- void push_back(value_type const& value)
- {
- check_capacity(m_size + 1);
-
- this->uninitialized_fill(this->end(), value); // may throw
- ++m_size; // update end
- }
-
- // nothrow
- void pop_back()
- {
- check_empty();
-
- //--m_size; // update end
- //this->destroy(this->end());
-
- // safer and more intuitive version
- this->destroy(this->end() - 1);
- --m_size; // update end
- }
-
- // basic
- void insert(iterator position, value_type const& value)
- {
- check_iterator_end_eq(position);
- check_capacity(m_size + 1);
-
- if ( position == this->end() )
- {
- this->uninitialized_fill(position, value); // may throw
- ++m_size; // update end
- }
- else
- {
- // TODO - should following lines check for exception and revert to the old size?
-
- this->uninitialized_fill(this->end(), *(this->end() - 1)); // may throw
- ++m_size; // update end
- this->move_backward(position, this->end() - 2, this->end() - 1); // may throw
- this->fill(position, value); // may throw
- }
- }
-
- // basic
- void insert(iterator position, size_type count, value_type const& value)
- {
- check_iterator_end_eq(position);
- check_capacity(m_size + count);
-
- if ( position == this->end() )
- {
- std::uninitialized_fill(position, position + count, value); // may throw
- m_size += count; // update end
- }
- else
- {
- difference_type to_move = std::distance(position, this->end());
-
- // TODO - should following lines check for exception and revert to the old size?
-
- if ( count < static_cast<size_type>(to_move) )
- {
- this->uninitialized_copy(this->end() - count, this->end(), this->end()); // may throw
- m_size += count; // update end
- this->move_backward(position, position + to_move - count, this->end() - count); // may throw
- std::fill_n(position, count, value); // may throw
- }
- else
- {
- std::uninitialized_fill(this->end(), position + count, value); // may throw
- m_size += count - to_move; // update end
- this->uninitialized_copy(position, position + to_move, position + count); // may throw
- m_size += to_move; // update end
- std::fill_n(position, to_move, value); // may throw
- }
- }
- }
-
- // basic
- template <typename Iterator>
- void insert(iterator position, Iterator first, Iterator last)
- {
- typedef typename boost::iterator_traversal<Iterator>::type traversal;
- this->insert_dispatch(position, first, last, traversal());
- }
-
- // basic
- void erase(iterator position)
- {
- check_iterator_end_neq(position);
-
- this->move(position + 1, this->end(), position); // may throw
- this->destroy(this->end() - 1);
- --m_size;
- }
-
- // basic
- void erase(iterator first, iterator last)
- {
- check_iterator_end_eq(first);
- check_iterator_end_eq(last);
-
- difference_type n = std::distance(first, last);
- BOOST_ASSERT_MSG(0 <= n, "invalid range");
-
- this->move(last, this->end(), first); // may throw
- this->destroy(this->end() - n, this->end());
- m_size -= n;
- }
-
- // basic
- template <typename Iterator>
- void assign(Iterator first, Iterator last)
- {
- typedef typename boost::iterator_traversal<Iterator>::type traversal;
- this->assign_dispatch(first, last, traversal()); // may throw
- }
-
- // basic
- void assign(size_type count, value_type const& value)
- {
- if ( count < m_size )
- {
- std::fill_n(this->begin(), count, value);
- this->destroy(this->begin() + count, this->end());
- }
- else
- {
- check_capacity(count);
-
- std::fill_n(this->begin(), m_size, value);
- std::uninitialized_fill(this->end(), this->begin() + count, value); // may throw
- }
- m_size = count; // update end
- }
-
- // nothrow
- void clear()
- {
- this->destroy(this->begin(), this->end());
- m_size = 0; // update end
- }
-
- // strong
- Value & at(size_type i)
- {
- if ( m_size <= i )
- throw std::out_of_range("index out of bounds");
- return *(this->begin() + i);
- }
-
- // strong
- Value const& at(size_type i) const
- {
- if ( m_size <= i )
- throw std::out_of_range("index out of bounds");
- return *(this->begin() + i);
- }
-
- // nothrow
- Value & operator[](size_type i)
- {
- BOOST_ASSERT_MSG(i < m_size, "index out of bounds");
- return *(this->begin() + i);
- }
-
- // nothrow
- Value const& operator[](size_type i) const
- {
- BOOST_ASSERT_MSG(i < m_size, "index out of bounds");
- return *(this->begin() + i);
- }
-
- // nothrow
- Value & front()
- {
- check_empty();
- return *(this->begin());
- }
-
- // nothrow
- Value const& front() const
- {
- check_empty();
- return *(this->begin());
- }
-
- // nothrow
- Value & back()
- {
- check_empty();
- return *(this->end() - 1);
- }
-
- // nothrow
- Value const& back() const
- {
- check_empty();
- return *(this->end() - 1);
- }
-
- // nothrow
- Value * data() { return this->ptr(); }
- const Value * data() const { return this->ptr(); }
-
- // nothrow
- iterator begin() { return this->ptr(); }
- const_iterator begin() const { return this->ptr(); }
- const_iterator cbegin() const { return this->ptr(); }
- iterator end() { return this->begin() + m_size; }
- const_iterator end() const { return this->begin() + m_size; }
- const_iterator cend() const { return this->cbegin() + m_size; }
- // nothrow
- reverse_iterator rbegin() { return reverse_iterator(this->end()); }
- const_reverse_iterator rbegin() const { return reverse_iterator(this->end()); }
- const_reverse_iterator crbegin() const { return reverse_iterator(this->end()); }
- reverse_iterator rend() { return reverse_iterator(this->begin()); }
- const_reverse_iterator rend() const { return reverse_iterator(this->begin()); }
- const_reverse_iterator crend() const { return reverse_iterator(this->begin()); }
-
- // nothrow
- size_type capacity() const { return Capacity; }
- size_type max_size() const { return Capacity; }
- size_type size() const { return m_size; }
- bool empty() const { return 0 == m_size; }
-
-private:
-
- // insert
-
- template <typename Iterator>
- void insert_dispatch(iterator position, Iterator first, Iterator last, boost::random_access_traversal_tag const&)
- {
- check_iterator_end_eq(position);
-
- difference_type count = std::distance(first, last);
-
- check_capacity(m_size + count);
-
- if ( position == this->end() )
- {
- this->uninitialized_copy(first, last, position); // may throw
- m_size += count; // update end
- }
- else
- {
- this->insert_in_the_middle(position, first, last, count); // may throw
- }
- }
-
- template <typename Iterator, typename Traversal>
- void insert_dispatch(iterator position, Iterator first, Iterator last, Traversal const& /*not_random_access*/)
- {
- check_iterator_end_eq(position);
-
- if ( position == this->end() )
- {
- std::pair<bool, size_type> copy_data =
- this->uninitialized_copy_checked(first, last, position, std::distance(position, this->begin() + Capacity)); // may throw
-
- check_capacity(copy_data.first ? m_size + copy_data.second : Capacity + 1);
-
- m_size += copy_data.second;
- }
- else
- {
- difference_type count = std::distance(first, last);
-
- check_capacity(m_size + count);
-
- this->insert_in_the_middle(position, first, last, count); // may throw
- }
- }
-
- template <typename Iterator>
- void insert_in_the_middle(iterator position, Iterator first, Iterator last, difference_type count)
- {
- difference_type to_move = std::distance(position, this->end());
-
- // TODO - should following lines check for exception and revert to the old size?
-
- if ( count < to_move )
- {
- this->uninitialized_copy(this->end() - count, this->end(), this->end()); // may throw
- m_size += count; // update end
- this->move_backward(position, position + to_move - count, this->end() - count); // may throw
- this->copy(first, last, position); // may throw
- }
- else
- {
- Iterator middle_iter = first;
- std::advance(middle_iter, to_move);
-
- this->uninitialized_copy(middle_iter, last, this->end()); // may throw
- m_size += count - to_move; // update end
- this->uninitialized_copy(position, position + to_move, position + count); // may throw
- m_size += to_move; // update end
- this->copy(first, middle_iter, position) ; // may throw
- }
- }
-
- // assign
-
- template <typename Iterator>
- void assign_dispatch(Iterator first, Iterator last, boost::random_access_traversal_tag const& /*not_random_access*/)
- {
- size_type s = std::distance(first, last);
-
- check_capacity(s);
-
- if ( m_size <= s )
- {
- this->copy(first, first + m_size, this->begin()); // may throw
- // TODO - perform uninitialized_copy first?
- this->uninitialized_copy(first + m_size, last, this->end()); // may throw
- }
- else
- {
- this->copy(first, last, this->begin()); // may throw
- this->destroy(this->begin() + s, this->end());
- }
- m_size = s; // update end
- }
-
- template <typename Iterator, typename Traversal>
- void assign_dispatch(Iterator first, Iterator last, Traversal const& /*not_random_access*/)
- {
- size_type s = 0;
- iterator it = this->begin();
-
- for ( ; it != this->end() && first != last ; ++it, ++first, ++s )
- *it = *first; // may throw
-
- this->destroy(it, this->end());
-
- std::pair<bool, size_type> copy_data =
- this->uninitialized_copy_checked(first, last, it, std::distance(it, this->begin() + Capacity)); // may throw
- s += copy_data.second;
-
- check_capacity(copy_data.first ? s : Capacity + 1);
-
- m_size = s; // update end
- }
-
- // uninitialized_copy_checked
-
- template <typename Iterator>
- std::pair<bool, size_type> uninitialized_copy_checked(Iterator first, Iterator last, iterator dest, size_type max_count)
- {
- size_type count = 0;
- iterator it = dest;
- try
- {
- for ( ; first != last ; ++it, ++first, ++count )
- {
- if ( max_count <= count )
- return std::make_pair(false, count);
-
- this->uninitialized_fill(it, *first); // may throw
- }
- }
- catch(...)
- {
- this->destroy(dest, it);
- throw;
- }
- return std::make_pair(true, count);
- }
-
- // copy
-
- template <typename Iterator>
- void copy(Iterator first, Iterator last, iterator dst)
- {
- typedef typename
- mpl::and_<
- has_trivial_assign<value_type>,
- mpl::or_<
- is_same<Iterator, value_type *>,
- is_same<Iterator, const value_type *>
- >
- >::type
- use_memcpy;
-
- this->copy_dispatch(first, last, dst, use_memcpy()); // may throw
- }
-
- void copy_dispatch(const value_type * first, const value_type * last, value_type * dst,
- boost::mpl::bool_<true> const& /*use_memcpy*/)
- {
- ::memcpy(dst, first, sizeof(value_type) * std::distance(first, last));
- }
-
- template <typename Iterator>
- void copy_dispatch(Iterator first, Iterator last, value_type * dst,
- boost::mpl::bool_<false> const& /*use_memcpy*/)
- {
- std::copy(first, last, dst); // may throw
- }
-
- // uninitialized_copy
-
- template <typename Iterator>
- void uninitialized_copy(Iterator first, Iterator last, iterator dst)
- {
- typedef typename
- mpl::and_<
- has_trivial_copy<value_type>,
- mpl::or_<
- is_same<Iterator, value_type *>,
- is_same<Iterator, const value_type *>
- >
- >::type
- use_memcpy;
-
- this->uninitialized_copy_dispatch(first, last, dst, use_memcpy()); // may throw
- }
-
- void uninitialized_copy_dispatch(const value_type * first, const value_type * last, value_type * dst,
- boost::mpl::bool_<true> const& /*use_memcpy*/)
- {
- ::memcpy(dst, first, sizeof(value_type) * std::distance(first, last));
- }
-
- template <typename Iterator>
- void uninitialized_copy_dispatch(Iterator first, Iterator last, value_type * dst,
- boost::mpl::bool_<false> const& /*use_memcpy*/)
- {
- std::uninitialized_copy(first, last, dst); // may throw
- }
-
- // uninitialized_fill
-
- template <typename V>
- void uninitialized_fill(iterator dst, V const& v)
- {
- typedef typename
- mpl::and_<
- has_trivial_copy<value_type>,
- is_same<Value, value_type>
- >::type
- use_memcpy;
-
- uninitialized_fill_dispatch(dst, v, use_memcpy()); // may throw
- }
-
- void uninitialized_fill_dispatch(value_type * ptr, value_type const& v,
- boost::mpl::bool_<true> const& /*use_memcpy*/)
- {
- // TODO - check if value_type has operator& defined and call this version only if it hasn't
- const value_type * vptr = &v;
- ::memcpy(ptr, vptr, sizeof(value_type));
- }
-
- template <typename V>
- void uninitialized_fill_dispatch(value_type * ptr, V const& v,
- boost::mpl::bool_<false> const& /*use_memcpy*/)
- {
- new (ptr) value_type(v); // may throw
- }
-
- // move
-
- void move(iterator first, iterator last, iterator dst)
- {
- this->move_dispatch(first, last, dst, has_trivial_assign<value_type>()); // may throw
- }
-
- void move_dispatch(value_type * first, value_type * last, value_type * dst,
- boost::true_type const& /*has_trivial_assign*/)
- {
- ::memmove(dst, first, sizeof(value_type) * std::distance(first, last));
- }
-
- void move_dispatch(value_type * first, value_type * last, value_type * dst,
- boost::false_type const& /*has_trivial_assign*/)
- {
- std::copy(first, last, dst); // may throw
- }
-
- // move_backward
-
- void move_backward(iterator first, iterator last, iterator dst)
- {
- this->move_backward_dispatch(first, last, dst, has_trivial_assign<value_type>()); // may throw
- }
-
- void move_backward_dispatch(value_type * first, value_type * last, value_type * dst,
- boost::true_type const& /*has_trivial_assign*/)
- {
- difference_type n = std::distance(first, last);
- ::memmove(dst - n, first, sizeof(value_type) * n);
- }
-
- void move_backward_dispatch(value_type * first, value_type * last, value_type * dst,
- boost::false_type const& /*has_trivial_assign*/)
- {
- std::copy_backward(first, last, dst); // may throw
- }
-
- // uninitialized_fill
-
- template <typename V>
- void fill(iterator dst, V const& v)
- {
- fill_dispatch(dst, v, has_trivial_assign<value_type>()); // may throw
- }
-
- void fill_dispatch(value_type * ptr, value_type const& v,
- boost::true_type const& /*has_trivial_assign*/)
- {
- // TODO - check if value_type has operator& defined and call this version only if it hasn't
- const value_type * vptr = &v;
- ::memcpy(ptr, vptr, sizeof(value_type));
- }
-
- template <typename V>
- void fill_dispatch(value_type * ptr, V const& v,
- boost::false_type const& /*has_trivial_assign*/)
- {
- *ptr = v; // may throw
- }
-
- // destroy
-
- void destroy(iterator first, iterator last)
- {
- this->destroy_dispatch(first, last, has_trivial_destructor<value_type>());
- }
-
- void destroy_dispatch(value_type * /*first*/, value_type * /*last*/,
- boost::true_type const& /*has_trivial_destructor*/)
- {}
-
- void destroy_dispatch(value_type * first, value_type * last,
- boost::false_type const& /*has_trivial_destructor*/)
- {
- for ( ; first != last ; ++first )
- first->~value_type();
- }
-
- // destroy
-
- void destroy(iterator it)
- {
- this->destroy_dispatch(it, has_trivial_destructor<value_type>());
- }
-
- void destroy_dispatch(value_type * /*ptr*/,
- boost::true_type const& /*has_trivial_destructor*/)
- {}
-
- void destroy_dispatch(value_type * ptr,
- boost::false_type const& /*has_trivial_destructor*/)
- {
- ptr->~value_type();
- }
-
- // construct
-
- void construct(iterator first, iterator last)
- {
- this->construct_dispatch(first, last, has_trivial_constructor<value_type>()); // may throw
- }
-
- void construct_dispatch(value_type * /*first*/, value_type * /*last*/,
- boost::true_type const& /*has_trivial_constructor*/)
- {}
-
- void construct_dispatch(value_type * first, value_type * last,
- boost::false_type const& /*has_trivial_constructor*/)
- {
- value_type * it = first;
- try
- {
- for ( ; it != last ; ++it )
- new (it) value_type(); // may throw
- }
- catch(...)
- {
- this->destroy(first, it);
- throw;
- }
- }
-
- void check_capacity(size_type s) const
- {
- BOOST_ASSERT_MSG(s <= Capacity, "size can't exceed the capacity");
- //if ( Capacity < s ) throw std::bad_alloc();
- }
-
- void check_empty() const
- {
- BOOST_ASSERT_MSG(0 < m_size, "the container is empty");
- }
-
- void check_iterator_end_neq(const_iterator position) const
- {
- BOOST_ASSERT_MSG(this->begin() <= position && position < this->end(), "iterator out of bounds");
-
- /*BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(
- difference_type dist = std::distance(this->begin(), position);
- )
- BOOST_ASSERT_MSG(
- 0 <= dist &&
- ( sizeof(dist) <= sizeof(m_size) ?
- (static_cast<size_type>(dist) < m_size) :
- ( dist < static_cast<difference_type>(m_size))
- ), "invalid iterator"
- );*/
- }
-
- void check_iterator_end_eq(const_iterator position) const
- {
- BOOST_ASSERT_MSG(this->begin() <= position && position <= this->end(), "iterator out of bounds");
-
- /*BOOST_GEOMETRY_INDEX_ASSERT_UNUSED_PARAM(
- difference_type dist = std::distance(this->begin(), position);
- )
- BOOST_ASSERT_MSG(
- 0 <= dist &&
- ( sizeof(dist) <= sizeof(m_size) ?
- (static_cast<size_type>(dist) <= m_size) :
- ( dist <= static_cast<difference_type>(m_size))
- ), "invalid iterator"
- );*/
- }
-
- Value * ptr()
- {
- return (reinterpret_cast<Value*>(m_storage.address()));
- }
-
- const Value * ptr() const
- {
- return (reinterpret_cast<const Value*>(m_storage.address()));
- }
-
- boost::aligned_storage<sizeof(Value[Capacity]), boost::alignment_of<Value[Capacity]>::value> m_storage;
- size_type m_size;
-};
-
-}}} // namespace boost::geometry::index
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_STATIC_VECTOR_HPP

Deleted: sandbox-branches/geometry/index/boost/geometry/extensions/index/tuples.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/extensions/index/tuples.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
+++ (empty file)
@@ -1,184 +0,0 @@
-// Boost.Geometry Index
-//
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-//
-// Use, modification and distribution is subject to 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)
-
-#ifndef BOOST_GEOMETRY_EXTENSIONS_INDEX_TUPLES_HPP
-#define BOOST_GEOMETRY_EXTENSIONS_INDEX_TUPLES_HPP
-
-#include <boost/tuple/tuple.hpp>
-
-// TODO move this to index/tuples and separate algorithms
-
-namespace boost { namespace geometry { namespace index {
-
-namespace tuples {
-
-// find_index
-
-namespace detail {
-
-template <typename Tuple, typename El, size_t N>
-struct find_index;
-
-template <typename Tuple, typename El, size_t N, typename CurrentEl>
-struct find_index_impl
-{
- static const size_t value = find_index<Tuple, El, N - 1>::value;
-};
-
-template <typename Tuple, typename El, size_t N>
-struct find_index_impl<Tuple, El, N, El>
-{
- static const size_t value = N - 1;
-};
-
-template <typename Tuple, typename El, typename CurrentEl>
-struct find_index_impl<Tuple, El, 1, CurrentEl>
-{
- BOOST_MPL_ASSERT_MSG(
- (false),
- ELEMENT_NOT_FOUND,
- (find_index_impl));
-};
-
-template <typename Tuple, typename El>
-struct find_index_impl<Tuple, El, 1, El>
-{
- static const size_t value = 0;
-};
-
-template <typename Tuple, typename El, size_t N>
-struct find_index
-{
- static const size_t value =
- find_index_impl<
- Tuple,
- El,
- N,
- typename boost::tuples::element<N - 1, Tuple>::type
- >::value;
-};
-
-} // namespace detail
-
-template <typename Tuple, typename El>
-struct find_index
-{
- static const size_t value =
- detail::find_index<
- Tuple,
- El,
- boost::tuples::length<Tuple>::value
- >::value;
-};
-
-// types_equal
-
-template <typename T1, typename T2>
-struct equal
-{
- static const bool value = false;
-};
-
-template <typename T>
-struct equal<T, T>
-{
- static const bool value = true;
-};
-
-// has
-
-namespace detail {
-
-template <typename Tuple, typename El, size_t N>
-struct has
-{
- static const bool value
- = equal<
- typename boost::tuples::element<N - 1, Tuple>::type,
- El
- >::value
- || has<Tuple, El, N - 1>::value;
-};
-
-template <typename Tuple, typename El>
-struct has<Tuple, El, 1>
-{
- static const bool value
- = equal<
- typename boost::tuples::element<0, Tuple>::type,
- El
- >::value;
-};
-
-} // namespace detail
-
-template <typename Tuple, typename El>
-struct has
-{
- static const bool value
- = detail::has<
- Tuple,
- El,
- boost::tuples::length<Tuple>::value
- >::value;
-};
-
-// add
-
-template <typename Tuple, typename El>
-struct add
-{
- BOOST_MPL_ASSERT_MSG(
- (false),
- NOT_IMPLEMENTED_FOR_THIS_TUPLE_TYPE,
- (add));
-};
-
-template <typename T1, typename T>
-struct add<boost::tuple<T1>, T>
-{
- typedef boost::tuple<T1, T> type;
-};
-
-template <typename T1, typename T2, typename T>
-struct add<boost::tuple<T1, T2>, T>
-{
- typedef boost::tuple<T1, T2, T> type;
-};
-
-// add_if
-
-template <typename Tuple, typename El, bool Cond>
-struct add_if
-{
- typedef Tuple type;
-};
-
-template <typename Tuple, typename El>
-struct add_if<Tuple, El, true>
-{
- typedef typename add<Tuple, El>::type type;
-};
-
-// add_unique
-
-template <typename Tuple, typename El>
-struct add_unique
-{
- typedef typename add_if<
- Tuple,
- El,
- !has<Tuple, El>::value
- >::type type;
-};
-
-} // namespace tuples
-
-}}} // namespace boost::geometry::index
-
-#endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_TAGS_HPP

Modified: sandbox-branches/geometry/index/doc/generated/rtree.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -38,7 +38,7 @@
 The Translator translates from Value to Indexable each time r-tree requires it. Which means that this operation is done for each Value access. Therefore the Translator should return the Indexable by const reference instead of a value. Default translator can translate all types adapted to Point or Box concepts (called Indexables). It also handles [^`std::pair<Indexable, T>`] and [^`boost::tuple<Indexable, ...>`]. For example, if [^`std::pair<Box, int>`] is stored in the container, the default translator translates from [^`std::pair<Box, int> const&`] to [^`Box const&`].
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/rtree.hpp>`
+`#include <boost/geometry/extensions/index/rtree.hpp>`
 
 [heading Synopsis]
 [pre
@@ -89,29 +89,29 @@
 
 [heading Member(s)]
 [table
-[[Modifier][Function][Description]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ab823a214501cb0f9fd00ba12a1ade179 `operator=(const rtree &)`]][The assignment operator. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a44bd4edee49db92c18b6bbbba77b42be `operator=(rtree &&)`]][The moving assignment. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1aad0285d25f96341a8dd6cc22feb3bd73 `swap(rtree &)`]][Swaps contents of two rtrees. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c `insert(value_type const &)`]][Insert a value to the index. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d `insert(Iterator, Iterator)`]][Insert a range of values to the index. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2 `insert(Range const &)`]][Insert a range of values to the index. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a `remove(value_type const &)`]][Remove a value from the container. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c `remove(Range const &)`]][Remove a range of values from the container. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920 `spatial_query(Predicates const &, OutIter)`]][Finds values meeting spatial predicates, e.g. intersecting some Box. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909 `nearest_query(DistancesPredicates const &, value_type &)`]][Finds one value meeting distances predicates, e.g. nearest to some Point. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc `nearest_query(DistancesPredicates const &, Predicates const &, value_type &)`]][Finds one value meeting distances predicates and spatial predicates, e.g. nearest to some Point and intersecting some Box. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a3101652211c9f2d6ed8626dae6ff5f9d `nearest_query(DistancesPredicates const &, size_type, OutIter)`]][Finds k values meeting distances predicates, e.g. k nearest values to some Point. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a31c23b87b01f12282ef0df6404ab7301 `nearest_query(DistancesPredicates const &, size_type, Predicates const &, OutIter)`]][Finds k values meeting distances predicates and spatial predicates, e.g. k nearest values to some Point and intersecting some Box. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd `size()`]][Returns the number of stored values. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c `empty()`]][Query if the container is empty. ]]
-[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09 `clear()`]][Removes all values stored in the container. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ad534a6ed759677548f50b86dfeba07c6 `box()`]][Returns the box containing all values stored in the container. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a17fce1fac81f6460d2c3a5744f4963ee `count(ValueOrIndexable const &)`]][Count Values or Indexables stored in the container. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a18910715f67608ff010556ac41f51606 `parameters()`]][Returns parameters. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1afc7e9a4bd53a58552c17c1e7cb997258 `translator()`]][Returns the translator object. ]]
-[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a1eeb303253f4cabe3a89a82ed41247ff `get_allocator()`]][Returns allocator used by the rtree. ]]
+[[Function][Description]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1ab823a214501cb0f9fd00ba12a1ade179 `operator=(const rtree &)`]][The assignment operator. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a44bd4edee49db92c18b6bbbba77b42be `operator=(rtree &&)`]][The moving assignment. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1aad0285d25f96341a8dd6cc22feb3bd73 `swap(rtree &)`]][Swaps contents of two rtrees. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c `insert(value_type const &)`]][Insert a value to the index. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d `insert(Iterator, Iterator)`]][Insert a range of values to the index. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2 `insert(Range const &)`]][Insert a range of values to the index. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a `remove(value_type const &)`]][Remove a value from the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c `remove(Range const &)`]][Remove a range of values from the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920 `spatial_query(Predicates const &, OutIter)`]][Finds values meeting spatial predicates, e.g. intersecting some Box. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909 `nearest_query(DistancesPredicates const &, value_type &)`]][Finds one value meeting distances predicates, e.g. nearest to some Point. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc `nearest_query(DistancesPredicates const &, Predicates const &, value_type &)`]][Finds one value meeting distances predicates and spatial predicates, e.g. nearest to some Point and intersecting some Box. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a3101652211c9f2d6ed8626dae6ff5f9d `nearest_query(DistancesPredicates const &, size_type, OutIter)`]][Finds k values meeting distances predicates, e.g. k nearest values to some Point. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a31c23b87b01f12282ef0df6404ab7301 `nearest_query(DistancesPredicates const &, size_type, Predicates const &, OutIter)`]][Finds k values meeting distances predicates and spatial predicates, e.g. k nearest values to some Point and intersecting some Box. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd `size()`]][Returns the number of stored values. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c `empty()`]][Query if the container is empty. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09 `clear()`]][Removes all values stored in the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1ad534a6ed759677548f50b86dfeba07c6 `box()`]][Returns the box containing all values stored in the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a17fce1fac81f6460d2c3a5744f4963ee `count(ValueOrIndexable const &)`]][Count Values or Indexables stored in the container. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a18910715f67608ff010556ac41f51606 `parameters()`]][Returns parameters. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1afc7e9a4bd53a58552c17c1e7cb997258 `translator()`]][Returns the translator object. ]]
+[[[link classboost_1_1geometry_1_1index_1_1rtree_1a1eeb303253f4cabe3a89a82ed41247ff `get_allocator()`]][Returns allocator used by the rtree. ]]
 ]
 
 [#classboost_1_1geometry_1_1index_1_1rtree_1afa64d1b825b06d196b1164aec27c2d7b]
@@ -124,8 +124,7 @@
 `rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]] `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]`()``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]`()``)`
 ]
 
-[heading Modifier(s)]
-``explicit ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]][ `parameters` ][The parameters object. ]]
@@ -208,8 +207,7 @@
       [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]`()``)`
 ]
 
-[heading Modifier(s)]
-``explicit ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`Range const &`][ `rng` ][The range of Values. ]]
@@ -633,8 +631,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `spatial_query``(``Predicates const &` `pred``,` `OutIter` `out_it``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`Predicates const &`][ `pred` ][The spatial predicates or a Geometry. ]]
@@ -686,8 +683,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `nearest_query``(``DistancesPredicates const &` `dpred``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` &` `v``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`DistancesPredicates const &`][ `dpred` ][The distances predicates or a Point.]]
@@ -753,8 +749,7 @@
                         [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` &` `v``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`DistancesPredicates const &`][ `dpred` ][The distances predicates or a Point. ]]
@@ -804,8 +799,7 @@
                         `OutIter` `out_it``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`DistancesPredicates const &`][ `dpred` ][The distances predicates or a Point. ]]
@@ -875,8 +869,7 @@
                         `OutIter` `out_it``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`DistancesPredicates const &`][ `dpred` ][The distances predicates or a Point ]]
@@ -901,8 +894,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `size``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 The number of stored values.
 [heading Throws]
 Nothing.
@@ -919,8 +911,7 @@
 `bool` `empty``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 true if the container is empty.
 [heading Throws]
 Nothing.
@@ -953,8 +944,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a42d0c9efffbc6f3935b5b9c3dd31e50d box_type]]` const &` `box``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 The box containing all values stored in the container or an invalid box if there are no values in the container.
 [heading Throws]
 Nothing.
@@ -972,8 +962,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `count``(``ValueOrIndexable const &` `vori``)`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`ValueOrIndexable const &`][ `vori` ][The value or indexable which will be counted.]]
@@ -995,8 +984,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 The parameters object.
 [heading Throws]
 Nothing.
@@ -1013,8 +1001,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 The translator object.
 [heading Throws]
 Nothing.
@@ -1031,8 +1018,7 @@
 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `get_allocator``()`
 ]
 
-[heading Modifier(s)]
-``const ``[heading Returns]
+[heading Returns]
 The allocator.
 [heading Throws]
 If allocator copy constructor throws.

Modified: sandbox-branches/geometry/index/doc/generated/rtree_linear.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_linear.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_linear.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 Linear r-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/rtree_quadratic.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_quadratic.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_quadratic.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 Quadratic r-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/rtree_rstar.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_rstar.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_rstar.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 R*-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/rtree_runtime_linear.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_runtime_linear.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_runtime_linear.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 Linear r-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/rtree_runtime_quadratic.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_runtime_quadratic.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_runtime_quadratic.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 Quadratic r-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/rtree_runtime_rstar.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_runtime_rstar.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_runtime_rstar.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -7,7 +7,7 @@
 R*-tree creation algorithm parameters.
 
 [heading Header]
-`#include <boost/geometry/extensions/index/rtree/options.hpp>`
+`#include <boost/geometry/extensions/index/parameters.hpp>`
 
 [heading Synopsis]
 [pre

Modified: sandbox-branches/geometry/index/doc/generated/translator_index.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/translator_index.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/translator_index.qbk 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -43,8 +43,7 @@
 `index``(``Container const &` `c``)`
 ]
 
-[heading Modifier(s)]
-``explicit ``[heading Parameter(s)]
+[heading Parameter(s)]
 [table
 [[Type][Name][Description]]
 [[`Container const &`][ `c` ][The container which stores indexed values. ]]

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Introduction</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>R-tree</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="prev" href="introduction.html" title="Introduction">

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Creation and modification</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="rtree_quickstart.html" title="Quick Start">
@@ -55,7 +55,7 @@
         </p>
 <pre class="programlisting"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Parameters</span><span class="special">,</span> <span class="identifier">Translator</span> <span class="special">=</span> <span class="identifier">translator</span><span class="special">::</span><span class="identifier">def</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span> <span class="special">&gt;</span>
 </pre>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="computeroutput">Value</code> - type of object which will be stored in the container,
             </li>
@@ -90,7 +90,7 @@
           be handled by the default <code class="computeroutput">Translator</code> - <code class="computeroutput"><span class="identifier">index</span><span class="special">::</span><span class="identifier">translator</span><span class="special">::</span><span class="identifier">def</span><span class="special">&lt;</span>Value<span class="special">&gt;</span></code>
           are defined as follows:
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="computeroutput">Indexable <span class="special">=</span> Point
               <span class="special">|</span> Box</code>
@@ -116,7 +116,7 @@
           A <code class="computeroutput">Translator</code> is a type which knows how to handle <code class="computeroutput">Value</code>s.
           It has two purposes:
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               it translates <code class="computeroutput">Value</code> to a more suitable <code class="computeroutput">Indexable</code>
               type which is needed by most of operations,
@@ -134,7 +134,7 @@
 <p>
           If comparison of two <code class="computeroutput">Value</code>s is required, the default translator:
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               for <code class="computeroutput">Point</code>
               and <code class="computeroutput">Box</code>

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Introduction</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="../r_tree.html" title="R-tree">
@@ -28,10 +28,10 @@
 </h3></div></div></div>
 <p>
         R-tree is a tree data structure used for spatial searching. It was proposed
- by Antonin Guttman in 1984 [1]</sup></a> as an expansion of B-tree for multi-dimensional data. It may
+ by Antonin Guttman in 1984 <sup>[<a name="geometry_index.r_tree.introduction.f0" href="#ftn.geometry_index.r_tree.introduction.f0" class="footnote">1</a>]</sup> as an expansion of B-tree for multi-dimensional data. It may
         be used to store points or volumetric data in order to perform a spatial
         query later. This query may return objects that are inside some area or are
- close to some point in space [2]</sup></a>.
+ close to some point in space <sup>[<a name="geometry_index.r_tree.introduction.f1" href="#ftn.geometry_index.r_tree.introduction.f1" class="footnote">2</a>]</sup>.
       </p>
 <p>
         The R-tree structure is presented on the image below. Each R-tree's node
@@ -51,7 +51,7 @@
       </p>
 <p>
         The R-tree is a self-balanced data structure. The key part of balancing algorithm
- is node splitting algorithm [3]</sup></a> [4]</sup></a>. Each algorithm produces different splits so the internal structure
+ is node splitting algorithm <sup>[<a name="geometry_index.r_tree.introduction.f2" href="#ftn.geometry_index.r_tree.introduction.f2" class="footnote">3</a>]</sup> <sup>[<a name="geometry_index.r_tree.introduction.f3" href="#ftn.geometry_index.r_tree.introduction.f3" class="footnote">4</a>]</sup>. Each algorithm produces different splits so the internal structure
         of a tree may be different for each one of them. In general more complex
         algorithms analyses elements better and produces less overlapping nodes.
         In the searching process less nodes must be traversed in order to find desired
@@ -179,13 +179,13 @@
 </table></div>
 <h5>
 <a name="geometry_index.r_tree.introduction.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.introduction.implementation_details"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.implementation_details">Implementation
+ <span><a name="geometry_index.r_tree.introduction.implementation_details"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.implementation_details">Implementation
         details</a>
       </h5>
 <p>
         Key features of this implementation of the R-tree are:
       </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
             capable to store arbitrary Value type,
           </li>
@@ -207,7 +207,7 @@
 </ul></div>
 <h5>
 <a name="geometry_index.r_tree.introduction.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.introduction.contributors"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.contributors">Contributors</a>
+ <span><a name="geometry_index.r_tree.introduction.contributors"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.contributors">Contributors</a>
       </h5>
 <p>
         The spatial index was originally started by Federico J. Fernandez during
@@ -215,7 +215,7 @@
       </p>
 <h5>
 <a name="geometry_index.r_tree.introduction.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.introduction.spatial_thanks"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.spatial_thanks">Spatial
+ <span><a name="geometry_index.r_tree.introduction.spatial_thanks"></a></span><a class="link" href="introduction.html#geometry_index.r_tree.introduction.spatial_thanks">Spatial
         thanks</a>
       </h5>
 <p>
@@ -224,20 +224,20 @@
         list for their help.
       </p>
 <div class="footnotes">
-<br><hr style="width:100; align:left;">
-<div id="ftn.geometry_index.r_tree.introduction.f0" class="footnote"><p>[1]
+<br><hr width="100" align="left">
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.introduction.f0" href="#geometry_index.r_tree.introduction.f0" class="para">1</a>] </sup>
           Guttman, A. (1984). <span class="emphasis"><em>R-Trees: A Dynamic Index Structure for Spatial
           Searching</em></span>
         </p></div>
-<div id="ftn.geometry_index.r_tree.introduction.f1" class="footnote"><p>[2]
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.introduction.f1" href="#geometry_index.r_tree.introduction.f1" class="para">2</a>] </sup>
           Cheung, K.; Fu, A. (1998). <span class="emphasis"><em>Enhanced Nearest Neighbour Search
           on the R-tree</em></span>
         </p></div>
-<div id="ftn.geometry_index.r_tree.introduction.f2" class="footnote"><p>[3]
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.introduction.f2" href="#geometry_index.r_tree.introduction.f2" class="para">3</a>] </sup>
           Greene, D. (1989). <span class="emphasis"><em>An implementation and performance analysis
           of spatial data access methods</em></span>
         </p></div>
-<div id="ftn.geometry_index.r_tree.introduction.f3" class="footnote"><p>[4]
+<div class="footnote"><p><sup>[<a id="ftn.geometry_index.r_tree.introduction.f3" href="#geometry_index.r_tree.introduction.f3" class="para">4</a>] </sup>
           Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). <span class="emphasis"><em>The
           R*-tree: an efficient and robust access method for points and rectangles</em></span>
         </p></div>

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Nearest neighbours queries</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="spatial_queries.html" title="Spatial queries">

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Reference</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
@@ -47,12 +47,12 @@
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree"></a><a name="classboost_1_1geometry_1_1index_1_1rtree"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree" title="boost::geometry::index::rtree">boost::geometry::index::rtree</a>
 </h4></div></div></div>
 <p>
- <a class="indexterm" name="id914825"></a><a class="indexterm" name="id914830"></a><a class="indexterm" name="id914835"></a><a class="indexterm" name="id914839"></a>
+ <a class="indexterm" name="idp9908160"></a><a class="indexterm" name="idp9908472"></a><a class="indexterm" name="idp9908784"></a><a class="indexterm" name="idp9909096"></a>
 The R-tree spatial index.
         </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.description">Description</a>
         </h6>
 <p>
           This is self-balancing spatial index capable to store various types of
@@ -60,7 +60,7 @@
         </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters">Parameters</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters">Parameters</a>
         </h6>
 <p>
           The user must pass a type defining the Parameters which will be used in
@@ -70,7 +70,7 @@
 <p>
           Predefined algorithms with compile-time parameters are:
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="literal"><a class="link" href="reference.html#structboost_1_1geometry_1_1index_1_1linear">boost::geometry::index::linear</a></code>,
             </li>
@@ -84,7 +84,7 @@
 <p>
           Predefined algorithms with run-time parameters are:
         </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
               <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1runtime_1_1linear">boost::geometry::index::runtime::linear</a></code>,
             </li>
@@ -97,7 +97,7 @@
 </ul></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator">Translator</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator">Translator</a>
         </h6>
 <p>
           The Translator translates from Value to Indexable each time r-tree requires
@@ -114,14 +114,14 @@
         </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.header">Header</a>
         </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
         </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Parameters</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -134,7 +134,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.template_parameter_s_">Template
           parameter(s)</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -208,7 +208,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h6"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.typedef_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.typedef_s_">Typedef(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.typedef_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.typedef_s_">Typedef(s)</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -316,7 +316,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h7"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.constructor_s__and_destructor">Constructor(s)
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.constructor_s__and_destructor">Constructor(s)
           and destructor</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -458,22 +458,16 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.h8"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.member_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.member_s_">Member(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.member_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.member_s_">Member(s)</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
 <col>
 <col>
-<col>
 </colgroup>
 <thead><tr>
 <th>
                   <p>
- Modifier
- </p>
- </th>
-<th>
- <p>
                     Function
                   </p>
                 </th>
@@ -486,8 +480,6 @@
 <tbody>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ab823a214501cb0f9fd00ba12a1ade179"><code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">rtree</span>
                     <span class="special">&amp;)</span></code></a>
@@ -501,8 +493,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a44bd4edee49db92c18b6bbbba77b42be"><code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">rtree</span> <span class="special">&amp;&amp;)</span></code></a>
                   </p>
@@ -515,8 +505,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1aad0285d25f96341a8dd6cc22feb3bd73"><code class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">rtree</span> <span class="special">&amp;)</span></code></a>
                   </p>
@@ -529,8 +517,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
@@ -544,8 +530,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">Iterator</span><span class="special">,</span>
                     <span class="identifier">Iterator</span><span class="special">)</span></code></a>
@@ -559,8 +543,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">Range</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
@@ -574,8 +556,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">value_type</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
@@ -589,8 +569,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">Iterator</span><span class="special">,</span>
                     <span class="identifier">Iterator</span><span class="special">)</span></code></a>
@@ -604,8 +582,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">Range</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
@@ -620,11 +596,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920"><code class="computeroutput"><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a>
                   </p>
@@ -639,11 +610,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909"><code class="computeroutput"><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">value_type</span>
                     <span class="special">&amp;)</span></code></a>
@@ -659,11 +625,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc"><code class="computeroutput"><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">Predicates</span>
                     <span class="keyword">const</span> <span class="special">&amp;,</span>
@@ -680,11 +641,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a3101652211c9f2d6ed8626dae6ff5f9d"><code class="computeroutput"><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a>
                   </p>
@@ -699,11 +655,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a31c23b87b01f12282ef0df6404ab7301"><code class="computeroutput"><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">Predicates</span>
                     <span class="keyword">const</span> <span class="special">&amp;,</span>
@@ -720,11 +671,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd"><code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -737,11 +683,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c"><code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -753,8 +694,6 @@
 </tr>
 <tr>
 <td>
- </td>
-<td>
                   <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09"><code class="computeroutput"><span class="identifier">clear</span><span class="special">()</span></code></a>
                   </p>
@@ -768,11 +707,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ad534a6ed759677548f50b86dfeba07c6"><code class="computeroutput"><span class="identifier">box</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -785,11 +719,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a17fce1fac81f6460d2c3a5744f4963ee"><code class="computeroutput"><span class="identifier">count</span><span class="special">(</span><span class="identifier">ValueOrIndexable</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
                   </p>
@@ -803,11 +732,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a18910715f67608ff010556ac41f51606"><code class="computeroutput"><span class="identifier">parameters</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -820,11 +744,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1afc7e9a4bd53a58552c17c1e7cb997258"><code class="computeroutput"><span class="identifier">translator</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -837,11 +756,6 @@
 <tr>
 <td>
                   <p>
- <code class="computeroutput"><span class="keyword">const</span></code>
- </p>
- </td>
-<td>
- <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a1eeb303253f4cabe3a89a82ed41247ff"><code class="computeroutput"><span class="identifier">get_allocator</span><span class="special">()</span></code></a>
                   </p>
                 </td>
@@ -862,22 +776,13 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a">parameters_type</a></code> <code class="computeroutput"><span class="identifier">parameters</span></code> = <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a">parameters_type</a></code><code class="computeroutput"><span class="special">()</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91">translator_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="iden
tifier">translator</span></code> = <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91">translator_type</a></code><code class="computeroutput"><span class="special">()</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">explicit</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -941,8 +846,8 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree__.throws">Throws</a>
           </h6>
 <p>
             If allocator default constructor throws.
@@ -958,7 +863,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a">parameters_type</a></code> <code class="computeroutput"><span class="identifier">parameters</span></code><code class="computeroutput"><span class="special">,</span></code>
       <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91">translator_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">translator</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -966,7 +871,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1048,7 +953,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_parameters_type__translator_type_const____allocator_type_.throws">Throws</a>
           </h6>
 <p>
             If allocator copy constructor throws.
@@ -1064,7 +969,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -1075,7 +980,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1191,9 +1096,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_iterator__iterator_.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If allocator copy constructor throws.
               </li>
@@ -1218,7 +1123,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -1228,16 +1133,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">explicit</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1336,10 +1232,10 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_range_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If allocator copy constructor throws.
               </li>
@@ -1363,13 +1259,13 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="special">~</span><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree._rtree__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -1385,20 +1281,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.description">Description</a>
           </h6>
 <p>
             It uses parameters, translator and allocator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1444,9 +1340,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If allocator copy constructor throws.
               </li>
@@ -1471,20 +1367,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.description">Description</a>
           </h6>
 <p>
             It uses Parameters and translator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d">allocator_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">allocator</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1550,9 +1446,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_const____allocator_type_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If allocator copy constructor throws.
               </li>
@@ -1577,20 +1473,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.description">Description</a>
           </h6>
 <p>
             It uses parameters, translator and allocator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1636,7 +1532,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree____.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -1652,20 +1548,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.description">Description</a>
           </h6>
 <p>
             It uses parameters and translator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">rtree</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d">allocator_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">allocator</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1731,9 +1627,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.rtree_rtree_____allocator_type_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If allocator copy constructor throws.
               </li>
@@ -1759,20 +1655,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.description">Description</a>
           </h6>
 <p>
             It uses parameters and translator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="keyword">operator</span><span class="special">=</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="keyword">const</span> </code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1818,9 +1714,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__const_rtree___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor throws.
               </li>
@@ -1842,20 +1738,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.description">Description</a>
           </h6>
 <p>
             It uses parameters and translator from the source tree.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="keyword">operator</span><span class="special">=</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;&amp;</span></code> <code class="computeroutput"><span class="identifier">src</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1901,12 +1797,12 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.operator__rtree____.throws">Throws</a>
           </h6>
 <p>
             Only if allocators aren't equal.
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor throws.
               </li>
@@ -1928,20 +1824,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.description">Description</a>
           </h6>
 <p>
             Parameters, translator and allocators are swapped as well.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">void</span></code> <code class="computeroutput"><span class="identifier">swap</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree">rtree</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">other</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -1987,7 +1883,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.swap_rtree___.throws">Throws</a>
           </h6>
 <p>
             If allocators swap throws.
@@ -2003,13 +1899,13 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">void</span></code> <code class="computeroutput"><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">value</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2055,9 +1951,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_value_type_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2090,14 +1986,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">void</span></code> <code class="computeroutput"><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2161,9 +2057,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_iterator__iterator_.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2196,14 +2092,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">void</span></code> <code class="computeroutput"><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2249,9 +2145,9 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.insert_range_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2284,7 +2180,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.description">Description</a>
           </h6>
 <p>
             In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code>
@@ -2293,13 +2189,13 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">value</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2345,16 +2241,16 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.returns">Returns</a>
           </h6>
 <p>
             1 if the value was removed, 0 otherwise.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_value_type_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2387,7 +2283,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.description">Description</a>
           </h6>
 <p>
             In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code>
@@ -2398,14 +2294,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2469,16 +2365,16 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.returns">Returns</a>
           </h6>
 <p>
             The number of removed values.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_iterator__iterator_.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2511,7 +2407,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.description">Description</a>
           </h6>
 <p>
             In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code>
@@ -2521,14 +2417,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2574,16 +2470,16 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.returns">Returns</a>
           </h6>
 <p>
             The number of removed values.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.remove_range_const___.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2616,7 +2512,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Spatial predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>. In this case Values
@@ -2626,7 +2522,7 @@
 <p>
             It may be generated by one of the functions listed below:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
@@ -2668,23 +2564,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">spatial_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2748,17 +2635,17 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws">Throws</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 If Value copy constructor or copy assignment throws.
               </li>
@@ -2777,7 +2664,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -2788,7 +2675,7 @@
             It is possible to define how distance to Value is calculated. This is
             done by passing PointRelation. It can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
                 - default,
@@ -2805,7 +2692,7 @@
             distance must be between min_distance and max_distance. This is done
             by passing DistancesPredicates which can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
                 - default,
@@ -2824,7 +2711,7 @@
             MinRelation and MaxRelation describes bounds and can be generated by
             following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
               </li>
@@ -2837,23 +2724,14 @@
 </ul></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2918,15 +2796,15 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws">Throws</a>
           </h6>
 <p>
             If Value copy constructor or copy assignment throws.
@@ -2943,7 +2821,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -2954,7 +2832,7 @@
             It is possible to define how distance to Value is calculated. This is
             done by passing PointRelation. It can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
                 - default,
@@ -2971,7 +2849,7 @@
             distance must be between min_distance and max_distance. This is done
             by passing DistancesPredicates which can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
                 - default,
@@ -2990,7 +2868,7 @@
             MinRelation and MaxRelation describes bounds and can be generated by
             following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
               </li>
@@ -3009,7 +2887,7 @@
 <p>
             It may be generated by one of the functions listed below:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
@@ -3051,7 +2929,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -3060,16 +2938,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3151,15 +3020,15 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws">Throws</a>
           </h6>
 <p>
             If Value copy constructor or copy assignment throws.
@@ -3176,7 +3045,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -3187,7 +3056,7 @@
             It is possible to define how distance to Value is calculated. This is
             done by passing PointRelation. It can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
                 - default,
@@ -3204,7 +3073,7 @@
             distance must be between min_distance and max_distance. This is done
             by passing DistancesPredicates which can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
                 - default,
@@ -3223,7 +3092,7 @@
             MinRelation and MaxRelation describes bounds and can be generated by
             following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
               </li>
@@ -3236,7 +3105,7 @@
 </ul></div>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -3245,16 +3114,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3335,15 +3195,15 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws">Throws</a>
           </h6>
 <p>
             If Value copy constructor or copy assignment throws. If OutIter dereference
@@ -3361,7 +3221,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -3372,7 +3232,7 @@
             It is possible to define how distance to Value is calculated. This is
             done by passing PointRelation. It can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
                 - default,
@@ -3389,7 +3249,7 @@
             distance must be between min_distance and max_distance. This is done
             by passing DistancesPredicates which can be generated by following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
                 - default,
@@ -3408,7 +3268,7 @@
             MinRelation and MaxRelation describes bounds and can be generated by
             following functions:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
               </li>
@@ -3427,7 +3287,7 @@
 <p>
             It may be generated by one of the functions listed below:
           </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
@@ -3469,7 +3329,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -3481,16 +3341,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3588,15 +3439,15 @@
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws">Throws</a>
           </h6>
 <p>
             If Value copy constructor or copy assignment throws. If OutIter dereference
@@ -3612,29 +3463,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">size</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.returns">Returns</a>
           </h6>
 <p>
             The number of stored values.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3649,29 +3491,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">bool</span></code> <code class="computeroutput"><span class="identifier">empty</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.returns">Returns</a>
           </h6>
 <p>
             true if the container is empty.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.empty__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3686,13 +3519,13 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">void</span></code> <code class="computeroutput"><span class="identifier">clear</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.throws">Throws</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.clear__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3707,7 +3540,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.description">Description</a>
           </h6>
 <p>
             Returns the box containing all values stored in the container. If the
@@ -3715,30 +3548,21 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a42d0c9efffbc6f3935b5b9c3dd31e50d">box_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">box</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.returns">Returns</a>
           </h6>
 <p>
             The box containing all values stored in the container or an invalid box
             if there are no values in the container.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.box__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3754,7 +3578,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.description">Description</a>
           </h6>
 <p>
             For indexable_type it returns the number of values which indexables equals
@@ -3763,23 +3587,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">ValueOrIndexable</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">count</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">ValueOrIndexable</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">vori</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3824,15 +3639,15 @@
 </tr></tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h3"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.h4"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.count_valueorindexable_const___.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3847,29 +3662,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a">parameters_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">parameters</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.returns">Returns</a>
           </h6>
 <p>
             The parameters object.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.parameters__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3884,29 +3690,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91">translator_type</a></code><code class="computeroutput"> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">translator</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.returns">Returns</a>
           </h6>
 <p>
             The translator object.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.translator__.throws">Throws</a>
           </h6>
 <p>
             Nothing.
@@ -3921,29 +3718,20 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d">allocator_type</a></code> <code class="computeroutput"><span class="identifier">get_allocator</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.modifier_s_">Modifier(s)</a>
- </h6>
-<p>
-</p>
-<pre class="programlisting"><span class="keyword">const</span></pre>
-<p>
- </p>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.returns">Returns</a>
           </h6>
 <p>
             The allocator.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.h2"></a>
+ <span><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.get_allocator__.throws">Throws</a>
           </h6>
 <p>
             If allocator copy constructor throws.
@@ -3957,7 +3745,7 @@
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.functions">Functions</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.functions">Functions</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4203,7 +3991,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c">rtree::insert(value_type
@@ -4211,7 +3999,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4221,7 +4009,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4300,7 +4088,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d">rtree::insert(Iterator,
@@ -4308,7 +4096,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4321,7 +4109,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4416,7 +4204,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2">rtree::insert(Range
@@ -4424,7 +4212,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4435,7 +4223,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4514,7 +4302,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description">Description</a>
           </h6>
 <p>
             Remove a value from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method this function removes
@@ -4526,7 +4314,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4536,7 +4324,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4606,7 +4394,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns">Returns</a>
           </h6>
 <p>
             1 if value was removed, 0 otherwise.
@@ -4622,7 +4410,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description">Description</a>
           </h6>
 <p>
             Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it doesn't take iterators
@@ -4636,7 +4424,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4649,7 +4437,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4735,7 +4523,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns">Returns</a>
           </h6>
 <p>
             The number of removed values.
@@ -4751,7 +4539,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description">Description</a>
           </h6>
 <p>
             Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it removes values
@@ -4764,7 +4552,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4775,7 +4563,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4845,7 +4633,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns">Returns</a>
           </h6>
 <p>
             The number of removed values.
@@ -4861,7 +4649,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920">rtree::spatial_query</a></code>
@@ -4869,7 +4657,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -4883,7 +4671,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4969,7 +4757,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.spatial_query_rtree______const____predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of found values.
@@ -4985,7 +4773,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909">rtree::nearest_query</a></code>
@@ -4994,7 +4782,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5007,7 +4795,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5094,7 +4882,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____value___.returns">Returns</a>
           </h6>
 <p>
             The number of found values.
@@ -5111,7 +4899,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909">rtree::nearest_query</a></code>
@@ -5123,7 +4911,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5138,7 +4926,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5242,7 +5030,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____predicates_const____value___.returns">Returns</a>
           </h6>
 <p>
             The number of found values.
@@ -5259,7 +5047,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909">rtree::nearest_query</a></code>
@@ -5270,7 +5058,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5285,7 +5073,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5390,7 +5178,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of found values.
@@ -5407,7 +5195,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909">rtree::nearest_query</a></code>
@@ -5420,7 +5208,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5437,7 +5225,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5559,7 +5347,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.nearest_query_rtree______const____distancespredicates_const____typename_rtree_______size_type__predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of found values.
@@ -5575,14 +5363,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09">rtree::clear()</a></code>.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5592,7 +5380,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.clear_rtree________.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5651,14 +5439,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd">rtree::size()</a></code>.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5668,7 +5456,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5718,7 +5506,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.size_rtree______const___.returns">Returns</a>
           </h6>
 <p>
             The number of values stored in the index.
@@ -5734,14 +5522,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c">rtree::empty()</a></code>.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5751,7 +5539,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5801,7 +5589,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.empty_rtree______const___.returns">Returns</a>
           </h6>
 <p>
             true if there are no values in the index.
@@ -5818,14 +5606,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.description">Description</a>
           </h6>
 <p>
             It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1ad534a6ed759677548f50b86dfeba07c6">rtree::box()</a></code>.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -5835,7 +5623,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -5885,7 +5673,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.box_rtree______const___.returns">Returns</a>
           </h6>
 <p>
             The box containing all stored values or an invalid box.
@@ -5902,19 +5690,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear"></a><a name="structboost_1_1geometry_1_1index_1_1linear"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear" title="boost::geometry::index::linear">boost::geometry::index::linear</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id951852"></a><a class="indexterm" name="id951857"></a><a class="indexterm" name="id951862"></a><a class="indexterm" name="id951866"></a>
+ <a class="indexterm" name="idp11716272"></a><a class="indexterm" name="idp11716600"></a><a class="indexterm" name="idp11716944"></a><a class="indexterm" name="idp11717288"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MaxElements</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MinElements</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">struct</span> <span class="identifier">linear</span></code>
@@ -5924,7 +5712,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -5977,19 +5765,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic"></a><a name="structboost_1_1geometry_1_1index_1_1quadratic"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic" title="boost::geometry::index::quadratic">boost::geometry::index::quadratic</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id952175"></a><a class="indexterm" name="id952180"></a><a class="indexterm" name="id952184"></a><a class="indexterm" name="id952189"></a>
+ <a class="indexterm" name="idp11741816"></a><a class="indexterm" name="idp11742144"></a><a class="indexterm" name="idp11742488"></a><a class="indexterm" name="idp11742832"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MaxElements</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MinElements</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">struct</span> <span class="identifier">quadratic</span></code>
@@ -5999,7 +5787,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6052,19 +5840,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar"></a><a name="structboost_1_1geometry_1_1index_1_1rstar"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar" title="boost::geometry::index::rstar">boost::geometry::index::rstar</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id952498"></a><a class="indexterm" name="id952502"></a><a class="indexterm" name="id952507"></a><a class="indexterm" name="id952512"></a>
+ <a class="indexterm" name="idp11767448"></a><a class="indexterm" name="idp11767776"></a><a class="indexterm" name="idp11768120"></a><a class="indexterm" name="idp11768464"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MaxElements</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="identifier">size_t</span> <span class="identifier">MinElements</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -6077,7 +5865,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6156,19 +5944,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1linear"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear" title="boost::geometry::index::runtime::linear">boost::geometry::index::runtime::linear</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id952946"></a><a class="indexterm" name="id952951"></a><a class="indexterm" name="id952956"></a><a class="indexterm" name="id952961"></a><a class="indexterm" name="id952966"></a>
+ <a class="indexterm" name="idp11802656"></a><a class="indexterm" name="idp11802984"></a><a class="indexterm" name="idp11803328"></a><a class="indexterm" name="idp11803672"></a><a class="indexterm" name="idp11804016"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">class</span> <span class="identifier">linear</span></code>
 <code class="computeroutput"><span class="special">{</span></code>
@@ -6177,7 +5965,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.constructor_s__and_destructor">Constructor(s)
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.constructor_s__and_destructor">Constructor(s)
             and destructor</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6220,11 +6008,11 @@
               The constructor.
             </p>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.synopsis">Synopsis</a>
             </h7><pre class="programlisting"><code class="computeroutput"><span class="identifier">linear</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">max_elements</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">min_elements</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear.linear_size_t__size_t_.parameter_s_">Parameter(s)</a>
             </h7><div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -6292,19 +6080,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1quadratic"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic" title="boost::geometry::index::runtime::quadratic">boost::geometry::index::runtime::quadratic</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id953438"></a><a class="indexterm" name="id953443"></a><a class="indexterm" name="id953448"></a><a class="indexterm" name="id953453"></a><a class="indexterm" name="id953458"></a>
+ <a class="indexterm" name="idp11843048"></a><a class="indexterm" name="idp11843376"></a><a class="indexterm" name="idp11843720"></a><a class="indexterm" name="idp11844064"></a><a class="indexterm" name="idp11844408"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">class</span> <span class="identifier">quadratic</span></code>
 <code class="computeroutput"><span class="special">{</span></code>
@@ -6313,7 +6101,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.constructor_s__and_destructor">Constructor(s)
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.constructor_s__and_destructor">Constructor(s)
             and destructor</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6356,11 +6144,11 @@
               The constructor.
             </p>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.synopsis">Synopsis</a>
             </h7><pre class="programlisting"><code class="computeroutput"><span class="identifier">quadratic</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">max_elements</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">min_elements</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic.quadratic_size_t__size_t_.parameter_s_">Parameter(s)</a>
             </h7><div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -6428,19 +6216,19 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1rstar"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar" title="boost::geometry::index::runtime::rstar">boost::geometry::index::runtime::rstar</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id955779"></a><a class="indexterm" name="id955784"></a><a class="indexterm" name="id955788"></a><a class="indexterm" name="id955793"></a><a class="indexterm" name="id955798"></a>
+ <a class="indexterm" name="idp11883688"></a><a class="indexterm" name="idp11884016"></a><a class="indexterm" name="idp11884360"></a><a class="indexterm" name="idp11884704"></a><a class="indexterm" name="idp11885048"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.header">Header</a>
           </h6>
 <p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">options</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">parameters</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">class</span> <span class="identifier">rstar</span></code>
 <code class="computeroutput"><span class="special">{</span></code>
@@ -6449,7 +6237,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.constructor_s__and_destructor">Constructor(s)
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.constructor_s__and_destructor">Constructor(s)
             and destructor</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6492,14 +6280,14 @@
               The constructor.
             </p>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.synopsis">Synopsis</a>
             </h7><pre class="programlisting"><code class="computeroutput"><span class="identifier">rstar</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">max_elements</span></code><code class="computeroutput"><span class="special">,</span></code>
       <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">min_elements</span></code><code class="computeroutput"><span class="special">,</span></code>
       <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">overlap_cost_threshold</span></code> = <code class="computeroutput"><span class="number">0</span></code><code class="computeroutput"><span class="special">,</span></code>
       <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">reinserted_elements</span></code> = <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">default_rstar_reinserted_elements_d</span><span class="special">()</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h7><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar.rstar_size_t__size_t_.parameter_s_">Parameter(s)</a>
             </h7><div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -6606,7 +6394,7 @@
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.functions">Functions</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.functions">Functions</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -6732,7 +6520,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.empty__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.empty__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.empty__.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.empty__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.empty__.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">empty</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">empty</span></code><code class="computeroutput"><span class="special">()</span></code>
 </pre>
@@ -6747,7 +6535,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.description">Description</a>
           </h6>
 <p>
             A wrapper around user-defined functor describing if Value should be returned
@@ -6755,14 +6543,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">ValuePredicate</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">value</span><span class="special">&lt;</span><span class="identifier">ValuePredicate</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">ValuePredicate</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">vpred</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6797,7 +6585,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_valuepredicate_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -6852,7 +6640,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.description">Description</a>
           </h6>
 <p>
             Generate a predicate defining Value and Geometry relationship. Value
@@ -6860,14 +6648,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -6902,7 +6690,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.covered_by_geometry_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -6958,7 +6746,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.description">Description</a>
           </h6>
 <p>
             Generate a predicate defining Value and Geometry relationship. Value
@@ -6966,14 +6754,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">disjoint</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjoint</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7008,7 +6796,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.disjoint_geometry_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7064,7 +6852,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.description">Description</a>
           </h6>
 <p>
             Generate a predicate defining Value and Geometry relationship. Value
@@ -7072,14 +6860,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7114,7 +6902,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.intersects_geometry_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7170,7 +6958,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.description">Description</a>
           </h6>
 <p>
             Generate a predicate defining Value and Geometry relationship. Value
@@ -7178,14 +6966,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">overlaps</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7220,7 +7008,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.overlaps_geometry_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7276,7 +7064,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.description">Description</a>
           </h6>
 <p>
             Generate a predicate defining Value and Geometry relationship. Value
@@ -7284,14 +7072,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">within</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7326,7 +7114,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7379,7 +7167,7 @@
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.functions">Functions</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.functions">Functions</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7515,7 +7303,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.description">Description</a>
           </h6>
 <p>
             Generate a nearest query Point and Value's Indexable relationship while
@@ -7528,14 +7316,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">T</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7571,7 +7359,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7627,7 +7415,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.description">Description</a>
           </h6>
 <p>
             Generate a nearest query Point and Value's Indexable relationship while
@@ -7638,14 +7426,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">T</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7681,7 +7469,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7737,7 +7525,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.description">Description</a>
           </h6>
 <p>
             Generate a nearest query Point and Value's Indexable relationship while
@@ -7750,14 +7538,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">T</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7793,7 +7581,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7849,7 +7637,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.description">Description</a>
           </h6>
 <p>
             Generate a distance predicate. This defines distances bounds which are
@@ -7860,14 +7648,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">PointRelation</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">unbounded</span><span class="special">&lt;</span><span class="identifier">PointRelation</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">unbounded</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">PointRelation</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pr</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -7902,7 +7690,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.unbounded_pointrelation_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7961,7 +7749,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.description">Description</a>
           </h6>
 <p>
             Generate a distance predicate. This defines distances bounds which are
@@ -7974,14 +7762,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">PointRelation</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">MinRelation</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">&lt;</span><span class="identifier">PointRelation</span><span class="special">,</span> <span class="identifier">MinRelation</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">PointRelation</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pr</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">MinRelation</span> <span clas
s="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">minr</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8030,7 +7818,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.min_bounded_pointrelation_const____minrelation_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8111,7 +7899,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.description">Description</a>
           </h6>
 <p>
             Generate a distance predicate. This defines distances bounds which are
@@ -8124,14 +7912,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">PointRelation</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">MaxRelation</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">max_bounded</span><span class="special">&lt;</span><span class="identifier">PointRelation</span><span class="special">,</span> <span class="identifier">MaxRelation</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">max_bounded</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">PointRelation</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pr</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">MaxRelation</span> <span clas
s="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">maxr</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8180,7 +7968,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.max_bounded_pointrelation_const____maxrelation_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8261,7 +8049,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.description">Description</a>
           </h6>
 <p>
             Generate a distance predicate. This defines distances bounds which are
@@ -8275,7 +8063,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">PointRelation</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">MinRelation</span></code><code class="computeroutput"><span class="special">,</span></code>
@@ -8286,7 +8074,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8347,7 +8135,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__distance__predicates.bounded_pointrelation_const____minrelation_const____maxrelation_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8445,7 +8233,7 @@
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.functions">Functions</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.functions">Functions</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8517,7 +8305,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">&lt;</span><span class="identifier">DistancesPredicates</span><span class="special">,</span> <span class="identifier">Predicates</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">nearest_queried</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span>
</code>
@@ -8526,7 +8314,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t__predicates_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8617,14 +8405,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">&lt;</span><span class="identifier">DistancesPredicates</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">detail</span><span class="special">::</span><span class="identifier">empty</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">nearest_queried</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
<code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">size_t</span></code> <code class="computeroutput"><span class="identifier">k</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.nearest_queried_distancespredicates_const____size_t_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8698,14 +8486,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">spatial_query</span><span class="special">&lt;</span><span class="identifier">Predicates</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">spatial_queried</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -8760,12 +8548,12 @@
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def"></a><a name="structboost_1_1geometry_1_1index_1_1translator_1_1def"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def" title="boost::geometry::index::translator::def">boost::geometry::index::translator::def</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id967911"></a><a class="indexterm" name="id967915"></a><a class="indexterm" name="id967920"></a><a class="indexterm" name="id967925"></a><a class="indexterm" name="id967930"></a>
+ <a class="indexterm" name="idp12564128"></a><a class="indexterm" name="idp12564456"></a><a class="indexterm" name="idp12564800"></a><a class="indexterm" name="idp12565144"></a><a class="indexterm" name="idp12565488"></a>
 The default translator.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.description">Description</a>
           </h6>
 <p>
             It translates Value object to Indexable object. The default version handles
@@ -8774,14 +8562,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.header">Header</a>
           </h6>
 <p>
             <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">translator</span><span class="special">/</span><span class="identifier">def</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">struct</span> <span class="identifier">def</span></code>
@@ -8791,7 +8579,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8830,12 +8618,12 @@
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index"></a><a name="classboost_1_1geometry_1_1index_1_1translator_1_1index"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index" title="boost::geometry::index::translator::index">boost::geometry::index::translator::index</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id968201"></a><a class="indexterm" name="id968206"></a><a class="indexterm" name="id968211"></a><a class="indexterm" name="id968215"></a><a class="indexterm" name="id968220"></a>
+ <a class="indexterm" name="idp12589432"></a><a class="indexterm" name="idp12589760"></a><a class="indexterm" name="idp12590104"></a><a class="indexterm" name="idp12590448"></a><a class="indexterm" name="idp12590792"></a>
 The index translator.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.description">Description</a>
           </h6>
 <p>
             This translator translates from index of an element in an external Container
@@ -8847,14 +8635,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.header">Header</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.header"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.header">Header</a>
           </h6>
 <p>
             <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">translator</span><span class="special">/</span><span class="identifier">index</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Container</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="keyword">class</span> <span class="identifier">index</span></code>
@@ -8864,7 +8652,7 @@
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.template_parameter_s_">Template
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.template_parameter_s_">Template
             parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8899,7 +8687,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.constructor_s__and_destructor">Constructor(s)
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.constructor_s__and_destructor"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.constructor_s__and_destructor">Constructor(s)
             and destructor</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -8942,18 +8730,11 @@
               The constructor.
             </p>
 <h7><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.synopsis">Synopsis</a>
             </h7><pre class="programlisting"><code class="computeroutput"><span class="identifier">index</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Container</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">c</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h7><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.modifier_s_">Modifier(s)</a>
- </h7><p>
-</p>
-<pre class="programlisting"><span class="keyword">explicit</span></pre>
-<p>
- </p>
-<h7><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index.index_container_const___.parameter_s_">Parameter(s)</a>
             </h7><div class="informaltable"><table class="table">
 <colgroup>
 <col>
@@ -9005,7 +8786,7 @@
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__inserters.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__inserters.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.functions">Functions</a>
+ <span><a name="geometry_index.r_tree.reference.group__inserters.functions"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.functions">Functions</a>
         </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -9047,7 +8828,7 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.description">Description</a>
+ <span><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.description">Description</a>
           </h6>
 <p>
             Returns insert iterator capable to insert values to the container (spatial
@@ -9055,14 +8836,14 @@
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.synopsis">Synopsis</a>
+ <span><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Container</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="computeroutput"><span class="identifier">insert_iterator</span><span class="special">&lt;</span><span class="identifier">Container</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">inserter</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Container</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">c</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
 <a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.parameter_s_">Parameter(s)</a>
+ <span><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -9108,7 +8889,7 @@
 </table></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.returns">Returns</a>
+ <span><a name="geometry_index.r_tree.reference.group__inserters.inserter_container___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__inserters.inserter_container___.returns">Returns</a>
           </h6>
 <p>
             The insert iterator inserting values to the container.

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Quick Start</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="introduction.html" title="Introduction">
@@ -39,7 +39,7 @@
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">point_xy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">geometries</span><span class="special">/</span><span class="identifier">box</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
-<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">extensions</span><span class="special">/</span><span class="identifier">index</span><span class="special">/</span><span class="identifier">rtree</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 
 <span class="comment">// to store queries results</span>
 <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">vector</span><span class="special">&gt;</span>
@@ -150,7 +150,7 @@
       </p>
 <h4>
 <a name="geometry_index.r_tree.rtree_quickstart.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.rtree_quickstart.more"></a></span><a class="link" href="rtree_quickstart.html#geometry_index.r_tree.rtree_quickstart.more">More</a>
+ <span><a name="geometry_index.r_tree.rtree_quickstart.more"></a></span><a class="link" href="rtree_quickstart.html#geometry_index.r_tree.rtree_quickstart.more">More</a>
       </h4>
 <p>
         More information about the R-tree implementation, other algorithms and queries

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Spatial queries</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="creation_and_modification.html" title="Creation and modification">

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 <title>Chapter&#160;1.&#160;Geometry Index</title>
 <link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 <link rel="home" href="index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="next" href="geometry_index/introduction.html" title="Introduction">
 </head>
@@ -52,7 +52,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: January 17, 2013 at 17:06:52 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 18, 2013 at 20:09:35 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Added: sandbox-branches/geometry/index/doc/src/examples/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/doc/src/examples/Jamfile.v2 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,19 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to 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)
+
+import testing ;
+
+project boost-geometry-index-doc-src-examples
+ :
+ requirements
+ <include>../../..
+ #<include>../../../boost/geometry/extensions/contrib/ttmath
+ <toolset>msvc:<asynch-exceptions>on
+ ;
+
+build-project rtree ;

Added: sandbox-branches/geometry/index/doc/src/examples/rtree/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/doc/src/examples/rtree/Jamfile.v2 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -0,0 +1,14 @@
+# Boost.Geometry Index
+#
+# Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+#
+# Use, modification and distribution is subject to 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)
+
+project boost-geometry-index-doc-src-examples-rtree
+ : # requirements
+ ;
+
+exe quick_start : quick_start.cpp ;
+

Modified: sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp
==============================================================================
--- sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp (original)
+++ sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -14,7 +14,7 @@
 #include <boost/geometry/geometries/point_xy.hpp>
 #include <boost/geometry/geometries/box.hpp>
 
-#include <boost/geometry/extensions/index/rtree/rtree.hpp>
+#include <boost/geometry/extensions/index/rtree.hpp>
 
 // to store queries results
 #include <vector>

Modified: sandbox-branches/geometry/index/test/geometry_index_test_common.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/geometry_index_test_common.hpp (original)
+++ sandbox-branches/geometry/index/test/geometry_index_test_common.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -12,7 +12,7 @@
 
 #include <boost/geometry.hpp>
 #define BOOST_GEOMETRY_INDEX_ENABLE_DEBUG_INTERFACE
-#include <boost/geometry/extensions/index/rtree/rtree.hpp>
+#include <boost/geometry/extensions/index/rtree.hpp>
 
 #include <geometry_test_common.hpp>
 

Modified: sandbox-branches/geometry/index/test/rtree/rtree_exceptions.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree_exceptions.cpp (original)
+++ sandbox-branches/geometry/index/test/rtree/rtree_exceptions.cpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -104,61 +104,61 @@
 
     for ( size_t i = 0 ; i < 100 ; i += 2 )
     {
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(10000);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(10000);
         
         Tree tree(parameters);
 
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(i);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(i);
 
- BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_pushable_array_exception );
+ BOOST_CHECK_THROW( tree.insert(input.begin(), input.end()), throwing_static_vector_exception );
     }
     
     for ( size_t i = 0 ; i < 50 ; i += 2 )
     {
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(10000);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(10000);
 
         Tree tree(parameters);
 
         tree.insert(input.begin(), input.end());
 
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(i);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(i);
 
- BOOST_CHECK_THROW( tree.remove(input.begin(), input.end()), throwing_pushable_array_exception );
+ BOOST_CHECK_THROW( tree.remove(input.begin(), input.end()), throwing_static_vector_exception );
     }
     
     for ( size_t i = 0 ; i < 50 ; i += 2 )
     {
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(10000);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(10000);
 
         Tree tree(parameters);
 
         tree.insert(input.begin(), input.end());
 
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(i);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(i);
 
- BOOST_CHECK_THROW( Tree tree2(tree), throwing_pushable_array_exception );
+ BOOST_CHECK_THROW( Tree tree2(tree), throwing_static_vector_exception );
     }
 
     for ( size_t i = 0 ; i < 50 ; i += 2 )
     {
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(10000);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(10000);
 
         Tree tree(parameters);
         Tree tree2(parameters);
 
         tree.insert(input.begin(), input.end());
 
- throwing_pushable_array_settings::reset_calls_counter();
- throwing_pushable_array_settings::set_max_calls(i);
+ throwing_static_vector_settings::reset_calls_counter();
+ throwing_static_vector_settings::set_max_calls(i);
 
- BOOST_CHECK_THROW(tree2 = tree, throwing_pushable_array_exception );
+ BOOST_CHECK_THROW(tree2 = tree, throwing_static_vector_exception );
     }
 }
 

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 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -16,10 +16,8 @@
 #include <vector>
 #include <algorithm>
 
-#include <boost/geometry/extensions/index/rtree/rtree.hpp>
-
-#include <boost/geometry/extensions/index/rtree/visitors/are_levels_ok.hpp>
-#include <boost/geometry/extensions/index/rtree/visitors/are_boxes_ok.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/are_levels_ok.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/visitors/are_boxes_ok.hpp>
 
 //#include <boost/geometry/geometries/ring.hpp>
 //#include <boost/geometry/geometries/polygon.hpp>
@@ -549,9 +547,9 @@
 template <typename Rtree, typename Value, typename Predicates>
 void test_spatial_query(Rtree & rtree, Predicates const& pred, std::vector<Value> const& expected_output)
 {
- BOOST_CHECK( bgi::detail::are_levels_ok(rtree) );
+ BOOST_CHECK( bgi::detail::rtree::are_levels_ok(rtree) );
     if ( !rtree.empty() )
- BOOST_CHECK( bgi::detail::are_boxes_ok(rtree) );
+ BOOST_CHECK( bgi::detail::rtree::are_boxes_ok(rtree) );
 
     std::vector<Value> output;
     size_t n = rtree.spatial_query(pred, std::back_inserter(output));

Modified: sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_rtree_exceptions.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -14,16 +14,12 @@
 
 #include <rtree/test_rtree.hpp>
 
-#include <boost/geometry/extensions/index/rtree/node/dynamic_visitor.hpp>
+#include <boost/geometry/extensions/index/detail/rtree/node/dynamic_visitor.hpp>
 
 #include <rtree/test_throwing.hpp>
 
 namespace boost { namespace geometry { namespace index {
 
-// options implementation (from options.hpp)
-
-struct node_throwing_d_mem_static_tag {};
-
 template <size_t MaxElements, size_t MinElements>
 struct linear_throwing : public linear<MaxElements, MinElements> {};
 
@@ -35,6 +31,10 @@
 
 namespace detail { namespace rtree {
 
+// options implementation (from options.hpp)
+
+struct node_throwing_d_mem_static_tag {};
+
 template <size_t MaxElements, size_t MinElements>
 struct options_type< linear_throwing<MaxElements, MinElements> >
 {
@@ -109,7 +109,7 @@
 
 // elements derived type
 template <typename OldValue, size_t N, typename NewValue>
-struct container_from_elements_type<throwing_pushable_array<OldValue, N>, NewValue>
+struct container_from_elements_type<throwing_static_vector<OldValue, N>, NewValue>
 {
     typedef throwing_static_vector<NewValue, N> type;
 };

Modified: sandbox-branches/geometry/index/test/rtree/test_throwing.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_throwing.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_throwing.hpp 2013-01-18 15:40:24 EST (Fri, 18 Jan 2013)
@@ -141,185 +141,7 @@
 //
 //}}} // namespace boost::geometry::index
 
-#include <boost/geometry/extensions/index/pushable_array.hpp>
-
-struct throwing_pushable_array_exception : public std::exception
-{
- const char * what() const throw() { return "pushable array exception."; }
-};
-
-struct throwing_pushable_array_settings
-{
- static void throw_if_required()
- {
- // throw if counter meets max count
- if ( get_max_calls_ref() <= get_calls_counter_ref() )
- throw throwing_pushable_array_exception();
- else
- ++get_calls_counter_ref();
- }
-
- static void reset_calls_counter() { get_calls_counter_ref() = 0; }
- static void set_max_calls(size_t mc) { get_max_calls_ref() = mc; }
-
- static size_t & get_calls_counter_ref() { static size_t cc = 0; return cc; }
- static size_t & get_max_calls_ref() { static size_t mc = (std::numeric_limits<size_t>::max)(); return mc; }
-};
-
-template <typename Element, size_t Capacity>
-class throwing_pushable_array
-{
- typedef typename boost::array<Element, Capacity> array_type;
-
-public:
- typedef typename array_type::value_type value_type;
- typedef typename array_type::size_type size_type;
- typedef typename array_type::iterator iterator;
- typedef typename array_type::const_iterator const_iterator;
- typedef typename array_type::reverse_iterator reverse_iterator;
- typedef typename array_type::const_reverse_iterator const_reverse_iterator;
- typedef typename array_type::reference reference;
- typedef typename array_type::const_reference const_reference;
-
- inline throwing_pushable_array()
- : m_size(0)
- {}
-
- //inline explicit throwing_pushable_array(size_type s)
- // : m_size(s)
- //{
- // BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
- //}
-
- inline void resize(size_type s)
- {
- BOOST_GEOMETRY_INDEX_ASSERT(s <= Capacity, "size too big");
- throwing_pushable_array_settings::throw_if_required();
- 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");
- return m_array[i];
- }
-
- inline Element const& operator[](size_type i) const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(i < m_size, "index of the element outside the container");
- return m_array[i];
- }
-
- inline Element const& front() const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return m_array.front();
- }
-
- inline Element & front()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return m_array.front();
- }
-
- inline Element const& back() const
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return *(begin() + (m_size - 1));
- }
-
- inline Element & back()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- return *(begin() + (m_size - 1));
- }
-
- inline iterator begin()
- {
- return m_array.begin();
- }
-
- inline iterator end()
- {
- return m_array.begin() + m_size;
- }
-
- inline const_iterator begin() const
- {
- return m_array.begin();
- }
-
- inline const_iterator end() const
- {
- return m_array.begin() + m_size;
- }
-
- inline reverse_iterator rbegin()
- {
- return reverse_iterator(end());
- }
-
- inline reverse_iterator rend()
- {
- return reverse_iterator(begin());
- }
-
- inline const_reverse_iterator rbegin() const
- {
- return const_reverse_iterator(end());
- }
-
- inline const_reverse_iterator rend() const
- {
- return const_reverse_iterator(begin());
- }
-
- inline void clear()
- {
- m_size = 0;
- }
-
- void push_back(Element const& v)
- {
- BOOST_GEOMETRY_INDEX_ASSERT(m_size < Capacity, "can't further increase the size of the container");
- throwing_pushable_array_settings::throw_if_required();
- m_array[m_size] = v;
- ++m_size;
- }
-
- inline void pop_back()
- {
- BOOST_GEOMETRY_INDEX_ASSERT(0 < m_size, "there are no elements in the container");
- --m_size;
- }
-
- inline bool empty() const
- {
- return m_size == 0;
- }
-
- inline size_t size() const
- {
- return m_size;
- }
-
- inline size_t capacity() const
- {
- return Capacity;
- }
-
-private:
- boost::array<Element, Capacity> m_array;
- size_type m_size;
-};
-
-#include <boost/geometry/extensions/index/static_vector.hpp>
+#include <boost/geometry/extensions/index/detail/static_vector.hpp>
 
 struct throwing_static_vector_exception : public std::exception
 {
@@ -332,7 +154,7 @@
     {
         // throw if counter meets max count
         if ( get_max_calls_ref() <= get_calls_counter_ref() )
- throw throwing_pushable_array_exception();
+ throw throwing_static_vector_exception();
         else
             ++get_calls_counter_ref();
     }
@@ -346,9 +168,9 @@
 
 template <typename Element, size_t Capacity>
 class throwing_static_vector
- : public boost::geometry::index::static_vector<Element, Capacity>
+ : public boost::geometry::index::detail::static_vector<Element, Capacity>
 {
- typedef boost::geometry::index::static_vector<Element, Capacity> container;
+ typedef boost::geometry::index::detail::static_vector<Element, Capacity> container;
 
 public:
     typedef typename container::value_type value_type;
@@ -362,13 +184,13 @@
 
     inline void resize(size_type s)
     {
- throwing_pushable_array_settings::throw_if_required();
+ throwing_static_vector_settings::throw_if_required();
         container::resize(s);
     }
 
     void push_back(Element const& v)
     {
- throwing_pushable_array_settings::throw_if_required();
+ throwing_static_vector_settings::throw_if_required();
         container::push_back(v);
     }
 };


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