Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84669 - in trunk/boost/geometry/index/detail/rtree: quadratic rstar
From: adam.wulkiewicz_at_[hidden]
Date: 2013-06-06 22:29:42


Author: awulkiew
Date: 2013-06-06 22:29:41 EDT (Thu, 06 Jun 2013)
New Revision: 84669
URL: http://svn.boost.org/trac/boost/changeset/84669

Log:
geometry.index: wrong condition fixed in quadratic/redistribute_elements. Comment added in rstar/redistribute_elements.

Text files modified:
   trunk/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp | 5 +++--
   trunk/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp | 1 +
   2 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp Thu Jun 6 21:35:02 2013 (r84668)
+++ trunk/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp 2013-06-06 22:29:41 EDT (Thu, 06 Jun 2013) (r84669)
@@ -187,8 +187,9 @@
                                       content_increase1, content_increase2);
 
                     if ( content_increase1 < content_increase2 ||
- ( content_increase1 == content_increase2 && content1 < content2 ) ||
- ( content1 == content2 && elements1_count <= elements2_count ) )
+ ( content_increase1 == content_increase2 && ( content1 < content2 ||
+ ( content1 == content2 && elements1_count <= elements2_count ) )
+ ) )
                     {
                         insert_into_group1 = true;
                     }

Modified: trunk/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp
==============================================================================
--- trunk/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp Thu Jun 6 21:35:02 2013 (r84668)
+++ trunk/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp 2013-06-06 22:29:41 EDT (Thu, 06 Jun 2013) (r84669)
@@ -90,6 +90,7 @@
             content_type ovl = index::detail::intersection_content(box1, box2);
             content_type con = index::detail::content(box1) + index::detail::content(box2);
 
+ // TODO - shouldn't here be < instead of <= ?
             if ( ovl < smallest_overlap || (ovl == smallest_overlap && con <= smallest_content) )
             {
                 choosen_index = 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