Boost logo

Boost-Commit :

From: mariano.consoni_at_[hidden]
Date: 2008-06-17 10:31:01


Author: mconsoni
Date: 2008-06-17 10:31:00 EDT (Tue, 17 Jun 2008)
New Revision: 46448
URL: http://svn.boost.org/trac/boost/changeset/46448

Log:

- Removed L_

Text files modified:
   sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp | 24 +++++++-----------------
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test_rtree.cpp | 4 ++--
   2 files changed, 9 insertions(+), 19 deletions(-)

Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/rtree.hpp 2008-06-17 10:31:00 EDT (Tue, 17 Jun 2008)
@@ -28,12 +28,12 @@
     // maximum number of elements per node
     unsigned int M_;
 
+ // tree root
     boost::shared_ptr< rtree_node<Point,Value> > root_;
 
   public:
- rtree(const geometry::box<Point> &initial_box, const unsigned int &L, const unsigned int &m, const unsigned int &M)
- : element_count(0), m_(m), M_(M),
- root_(new rtree_node<Point, Value>(boost::shared_ptr< rtree_node<Point,Value> >(), 1))
+ rtree(const geometry::box<Point> &initial_box, const unsigned int &M, const unsigned int &m)
+ : element_count(0), m_(m), M_(M), root_(new rtree_node<Point, Value>(boost::shared_ptr< rtree_node<Point,Value> >(), 1))
     {
       root_->set_root();
       boost::shared_ptr< rtree_leaf<Point, Value> > new_leaf(new rtree_leaf<Point, Value>(root_));
@@ -71,7 +71,10 @@
 
     virtual void print(void) const
     {
+ std::cerr << "===================================" << std::endl;
+ std::cerr << " Min/Max: " << m_ << " / " << M_ << std::endl;
       root_->print();
+ std::cerr << "===================================" << std::endl;
     }
 
     virtual void insert(const Point &k, const Value &v)
@@ -141,11 +144,9 @@
     }
 
     virtual unsigned int elements(void) { return element_count; }
-
 
     virtual ~rtree() {}
 
-
   private:
 
     void adjust_tree(boost::shared_ptr<rtree_node<Point, Value> > &n)
@@ -212,14 +213,8 @@
         typename rtree_leaf<Point,Value>::leaves_map nodes = n->get_leaves();
         for(typename rtree_leaf<Point,Value>::leaves_map::const_iterator it = nodes.begin(); it != nodes.end(); ++it, index++) {
           if(index != seed1 && index != seed2) {
- // TODO: check if the remaining elements should be in one group because of the minimum
-
- unsigned int remaining = nodes.size() - index; // 2 because of the seeds
 
-// std::cerr << "Remaining: " << remaining;
-// std::cerr << " n1: " << n1->elements();
-// std::cerr << " n2: " << n2->elements();
-// std::cerr << std::endl;
+ unsigned int remaining = nodes.size() - index; // 2 because of the seeds
 
             if(n1->elements() + remaining == m_) {
               n1->add_value(it->first, it->second);
@@ -279,14 +274,9 @@
         typename rtree_node<Point,Value>::node_map nodes = n->get_nodes();
         for(typename rtree_node<Point,Value>::node_map::const_iterator it = nodes.begin(); it != nodes.end(); ++it, index++) {
           if(index != seed1 && index != seed2) {
- // TODO: check if the remaining elements should be in one group because of the minimum
 
             unsigned int remaining = nodes.size() - index; // 2 because of the seeds
 
- std::cerr << "Remaining: " << remaining;
- std::cerr << " n1: " << n1->elements();
- std::cerr << " n2: " << n2->elements();
- std::cerr << std::endl;
             if(n1->elements() + remaining == m_) {
               n1->add_node(it->first, it->second);
               continue;

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test_rtree.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test_rtree.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test_rtree.cpp 2008-06-17 10:31:00 EDT (Tue, 17 Jun 2008)
@@ -20,7 +20,7 @@
 
         {
           boost::shared_ptr< boost::spatial_index::spatial_index< geometry::point_xy<double> , unsigned int > >
- q(new boost::spatial_index::rtree< geometry::point_xy<double> , unsigned int >(b, 4, 2, 4));
+ q(new boost::spatial_index::rtree< geometry::point_xy<double> , unsigned int >(b, 4, 2));
 
           std::cerr << std::endl;
           std::cerr << " --> bulk insert" << std::endl;
@@ -54,7 +54,7 @@
         /// insertion tests
  
         boost::shared_ptr< boost::spatial_index::spatial_index< geometry::point_xy<double> , unsigned int > >
- q(new boost::spatial_index::rtree< geometry::point_xy<double> , unsigned int >(b, 4, 2, 4));
+ q(new boost::spatial_index::rtree< geometry::point_xy<double> , unsigned int >(b, 4, 2));
 
         geometry::box<geometry::point_xy<double> > e1(geometry::point_xy<double>(2.0, 2.0), geometry::point_xy<double>(4.0, 4.0));
         geometry::box<geometry::point_xy<double> > e2(geometry::point_xy<double>(0.0, 1.0), geometry::point_xy<double>(2.0, 2.0));


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