Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84872 - in trunk/boost/geometry: extensions/nsphere extensions/nsphere/index/detail/algorithms extensions/nsphere/index/detail/rtree/rstar index/detail index/detail/algorithms
From: adam.wulkiewicz_at_[hidden]
Date: 2013-06-21 20:36:31


Author: awulkiew
Date: 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013)
New Revision: 84872
URL: http://svn.boost.org/trac/boost/changeset/84872

Log:
[geometry]: [index] some unused variables removed. [extensions] added support for nsphere in rstar algorithm

Added:
   trunk/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/
   trunk/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp (contents, props changed)
Text files modified:
   trunk/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp | 2
   trunk/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp | 74 ++++++++++++++++++++++++++++++++++++++++
   trunk/boost/geometry/extensions/nsphere/nsphere.hpp | 1
   trunk/boost/geometry/index/detail/algorithms/margin.hpp | 2
   trunk/boost/geometry/index/detail/predicates.hpp | 6 +-
   trunk/boost/geometry/index/detail/varray.hpp | 4 +-
   trunk/boost/geometry/index/detail/varray_detail.hpp | 4 +-
   7 files changed, 84 insertions(+), 9 deletions(-)

Modified: trunk/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp
==============================================================================
--- trunk/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -31,7 +31,7 @@
 template <typename NSphere>
 struct comparable_margin_nsphere<NSphere, 1>
 {
- static inline typename default_margin_result<NSphere>::type apply(NSphere const& s)
+ static inline typename default_margin_result<NSphere>::type apply(NSphere const& )
     {
         return 1;
     }

Added: trunk/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -0,0 +1,74 @@
+// Boost.Geometry Index
+//
+// R-tree R*-tree split algorithm implementation
+//
+// Copyright (c) 2011-2013 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_NSPHERE_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
+#define BOOST_GEOMETRY_EXTENSIONS_NSPHERE_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP
+
+#include <boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp>
+
+namespace boost { namespace geometry { namespace index {
+
+namespace detail { namespace rtree { namespace rstar {
+
+template <typename Element, typename Translator, size_t AxisIndex>
+class element_axis_corner_less<Element, Translator, nsphere_tag, min_corner, AxisIndex>
+{
+public:
+ element_axis_corner_less(Translator const& tr)
+ : m_tr(tr)
+ {}
+
+ bool operator()(Element const& e1, Element const& e2) const
+ {
+ typedef typename rtree::element_indexable_type<Element, Translator>::type indexable_type;
+ indexable_type const& i1 = rtree::element_indexable(e1, m_tr);
+ indexable_type const& i2 = rtree::element_indexable(e2, m_tr);
+
+ return geometry::get<AxisIndex>(i1) - get_radius<0>(i1)
+ < geometry::get<AxisIndex>(i2) - get_radius<0>(i2);
+ }
+
+private:
+ Translator const& m_tr;
+};
+
+template <typename Element, typename Translator, size_t AxisIndex>
+class element_axis_corner_less<Element, Translator, nsphere_tag, max_corner, AxisIndex>
+{
+public:
+ element_axis_corner_less(Translator const& tr)
+ : m_tr(tr)
+ {}
+
+ bool operator()(Element const& e1, Element const& e2) const
+ {
+ typedef typename rtree::element_indexable_type<Element, Translator>::type indexable_type;
+ indexable_type const& i1 = rtree::element_indexable(e1, m_tr);
+ indexable_type const& i2 = rtree::element_indexable(e2, m_tr);
+
+ return geometry::get<AxisIndex>(i1) + get_radius<0>(i1)
+ < geometry::get<AxisIndex>(i2) + get_radius<0>(i2);
+ }
+
+private:
+ Translator const& m_tr;
+};
+
+template <typename Parameters, typename Box, size_t AxisIndex>
+struct choose_split_axis_and_index_for_axis<Parameters, Box, AxisIndex, nsphere_tag>
+ : choose_split_axis_and_index_for_axis<Parameters, Box, AxisIndex, box_tag>
+{};
+
+
+}}} // namespace detail::rtree::rstar
+
+}}} // namespace boost::geometry::index
+
+#endif // BOOST_GEOMETRY_EXTENSIONS_NSPHERE_INDEX_DETAIL_RTREE_RSTAR_REDISTRIBUTE_ELEMENTS_HPP

Modified: trunk/boost/geometry/extensions/nsphere/nsphere.hpp
==============================================================================
--- trunk/boost/geometry/extensions/nsphere/nsphere.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/extensions/nsphere/nsphere.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -49,5 +49,6 @@
 #include <boost/geometry/extensions/nsphere/index/detail/algorithms/bounds.hpp>
 
 #include <boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp>
+#include <boost/geometry/extensions/nsphere/index/detail/rtree/rstar/redistribute_elements.hpp>
 
 #endif // BOOST_GEOMETRY_EXTENSIONS_NSPHERE_HPP

Modified: trunk/boost/geometry/index/detail/algorithms/margin.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/algorithms/margin.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/index/detail/algorithms/margin.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -130,7 +130,7 @@
 {
     typedef typename default_margin_result<Geometry>::type result_type;
 
- static inline result_type apply(Geometry const& g) { return 0; }
+ static inline result_type apply(Geometry const& ) { return 0; }
 };
 
 template <typename Box>

Modified: trunk/boost/geometry/index/detail/predicates.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/predicates.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/index/detail/predicates.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -378,7 +378,7 @@
     typedef spatial_predicate<Geometry, contains_tag, true> Pred;
 
     template <typename Value, typename Indexable>
- static inline bool apply(Pred const& p, Value const&, Indexable const& i)
+ static inline bool apply(Pred const& , Value const&, Indexable const& )
     {
         return true;
     }
@@ -391,7 +391,7 @@
     typedef spatial_predicate<Geometry, covers_tag, true> Pred;
 
     template <typename Value, typename Indexable>
- static inline bool apply(Pred const& p, Value const&, Indexable const& i)
+ static inline bool apply(Pred const& , Value const&, Indexable const& )
     {
         return true;
     }
@@ -417,7 +417,7 @@
     typedef spatial_predicate<Geometry, overlaps_tag, true> Pred;
 
     template <typename Value, typename Indexable>
- static inline bool apply(Pred const& p, Value const&, Indexable const& i)
+ static inline bool apply(Pred const& , Value const&, Indexable const& )
     {
         return true;
     }

Modified: trunk/boost/geometry/index/detail/varray.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/varray.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/index/detail/varray.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -1863,7 +1863,7 @@
     }
 
     // strong
- varray(varray const& other)
+ varray(varray const& /*other*/)
     {
         //errh::check_capacity(*this, count);
     }
@@ -1883,7 +1883,7 @@
     }
 
     // basic
- varray & operator=(varray const& other)
+ varray & operator=(varray const& /*other*/)
     {
         //errh::check_capacity(*this, other.size());
         return *this;

Modified: trunk/boost/geometry/index/detail/varray_detail.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/varray_detail.hpp Fri Jun 21 19:14:46 2013 (r84871)
+++ trunk/boost/geometry/index/detail/varray_detail.hpp 2013-06-21 20:36:31 EDT (Fri, 21 Jun 2013) (r84872)
@@ -454,7 +454,7 @@
 
 template <typename I>
 inline
-void uninitialized_fill_dispatch(I first, I last,
+void uninitialized_fill_dispatch(I /*first*/, I /*last*/,
                                  boost::true_type const& /*has_trivial_constructor*/,
                                  boost::true_type const& /*disable_trivial_init*/)
 {}
@@ -504,7 +504,7 @@
 
 template <typename I>
 inline
-void construct_dispatch(boost::mpl::bool_<true> const& /*dont_init*/, I pos)
+void construct_dispatch(boost::mpl::bool_<true> const& /*dont_init*/, I /*pos*/)
 {}
 
 template <typename I>


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