Boost logo

Boost-Commit :

From: mariano.consoni_at_[hidden]
Date: 2008-07-16 14:11:53


Author: mconsoni
Date: 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
New Revision: 47479
URL: http://svn.boost.org/trac/boost/changeset/47479

Log:
- Improved constructor.

Text files modified:
   sandbox/SOC/2008/spacial_indexing/boost/spatial_index/spatial_index.hpp | 6 +++++-
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/custom_point_test.cpp | 2 +-
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test.cpp | 2 +-
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test_rtree.cpp | 4 +---
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test.cpp | 2 +-
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test_rtree.cpp | 3 +--
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test.cpp | 2 +-
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test_rtree.cpp | 6 ++----
   8 files changed, 13 insertions(+), 14 deletions(-)

Modified: sandbox/SOC/2008/spacial_indexing/boost/spatial_index/spatial_index.hpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/boost/spatial_index/spatial_index.hpp (original)
+++ sandbox/SOC/2008/spacial_indexing/boost/spatial_index/spatial_index.hpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -23,7 +23,11 @@
 
 public:
 
- spatial_index(const geometry::box<Point> &b, const unsigned int m, const unsigned int M) : i_(b, m, M) {}
+ /// quadtree constructor
+ spatial_index(const geometry::box<Point> &b, const unsigned int M) : i_(b, M) {}
+
+ /// rtree constructor
+ spatial_index(const unsigned int m, const unsigned int M) : i_(m, M) {}
 
   /// insert data 'v' with key 'k'
   void insert(const Point &k, const Value &v) { i_.insert(k, v); }

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/custom_point_test.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/custom_point_test.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/custom_point_test.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -100,7 +100,7 @@
 
         typedef std::vector<std::string>::iterator value_type;
 
- boost::spatial_index::spatial_index<my_2d_point, value_type, boost::spatial_index::quadtree<my_2d_point, value_type> > q(b, 0, 1);
+ boost::spatial_index::spatial_index<my_2d_point, value_type, boost::spatial_index::quadtree<my_2d_point, value_type> > q(b, 1);
 
 // std::cerr << " --> bulk insert" << std::endl;
 // std::vector<std::string>::iterator b, e;

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -106,7 +106,7 @@
   typedef geometry::point_xy<double> point_type;
   typedef unsigned int value_type;
 
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(plane, 0, 1);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(plane, 1);
 
   // load data
   std::cerr << " --> bulk insert" << std::endl;

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test_rtree.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test_rtree.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/performance_test_rtree.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -102,9 +102,7 @@
   typedef geometry::point_xy<double> point_type;
   typedef unsigned int value_type;
 
- geometry::box<point_type> plane;
-
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(plane, 16, 8);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(16, 8);
 
   // load data
   std::cerr << " --> bulk insert" << std::endl;

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -54,7 +54,7 @@
   typedef geometry::point_xy<double> point_type;
   typedef unsigned int value_type;
 
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(plane, 0, 1);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(plane, 1);
 
   // generate random data
   for(unsigned int i = 0; i < points_count; i++) {

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test_rtree.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test_rtree.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/random_test_rtree.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -51,8 +51,7 @@
   typedef geometry::point_xy<double> point_type;
   typedef unsigned int value_type;
 
- geometry::box<point_type> plane;
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(plane, 8, 4);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(8, 4);
 
   // generate random data
   for(unsigned int i = 0; i < points_count; i++) {

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test.cpp
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test.cpp (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/test/simple_test.cpp 2008-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -38,7 +38,7 @@
         typedef geometry::point_xy<double> point_type;
         typedef std::vector<std::string>::iterator value_type;
 
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(b, 0, 1);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::quadtree<point_type, value_type> > q(b, 1);
 
 // std::cerr << " --> bulk insert" << std::endl;
 // std::vector<std::string>::iterator b, e;

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-07-16 14:11:52 EDT (Wed, 16 Jul 2008)
@@ -20,10 +20,8 @@
   typedef geometry::point_xy<double> point_type;
   typedef unsigned int value_type;
 
- geometry::box<point_type> b;
-
   {
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(b, 4, 2);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(4, 2);
 
     std::cerr << std::endl;
     std::cerr << " --> bulk insert" << std::endl;
@@ -55,7 +53,7 @@
 
 
   /// insertion tests
- boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(b, 4, 2);
+ boost::spatial_index::spatial_index<point_type, value_type, boost::spatial_index::rtree<point_type, value_type> > q(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));


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