Boost logo

Boost-Commit :

From: mariano.consoni_at_[hidden]
Date: 2008-08-15 18:54:28


Author: mconsoni
Date: 2008-08-15 18:54:28 EDT (Fri, 15 Aug 2008)
New Revision: 48167
URL: http://svn.boost.org/trac/boost/changeset/48167

Log:
- More tutorials.

Text files modified:
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/faq.qbk | 12 ++++++++++--
   sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/tutorials.qbk | 31 +++++++++++++++++++++++++++++++
   2 files changed, 41 insertions(+), 2 deletions(-)

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/faq.qbk
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/faq.qbk (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/faq.qbk 2008-08-15 18:54:28 EDT (Fri, 15 Aug 2008)
@@ -8,5 +8,13 @@
 [section:faq FAQ]
 
 [section Question]
-
-Answer:
\ No newline at end of file
+
+Which is the best index?
+
+Answer: There is no best index for every indexing problem, each one has its own
+strenghts. In the "Performance comparison" section we show each index at work
+and we mark their own strenghts. As a rule of thumb you should use the rtree for
+large data sets with rare inserts/updates and the quadtree for
+scenarios where insert/updates very frequent. This is motly because the rtree
+node spliting/joining algorithms are heavier than the simple quadree insertion
+algorithm.

Modified: sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/tutorials.qbk
==============================================================================
--- sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/tutorials.qbk (original)
+++ sandbox/SOC/2008/spacial_indexing/libs/spatial_index/doc/tutorials.qbk 2008-08-15 18:54:28 EDT (Fri, 15 Aug 2008)
@@ -100,4 +100,35 @@
 q.remove(geometry::point_xy<double>(9.0,9.0));
 ``
 
+[section:tutorial1 Tutorial - rtree particularities]
+
+In this tutorial we want to show how could change the previous tutorial with
+the use of an rtree. As it's a different structure the creation parameters are
+not the same, and we also have some other features in the insertion and
+deletion algorithms.
+
+First, let's see the constructor of the rtree:
+
+``
+spatial_index(const unsigned int m, const unsigned int M):i_(m, M)
+``
+
+In this case we have also two parameters, but none of them is a box because a
+bounding box is not needed for this structure. We have two integers that are
+low and high bounds for the number of elements in a node.
+
+The great difference of the structure is that the rtree allows insertion of
+not only points, but rectangles. This adds a lot of flexibility because
+any shape could have a minimum bounding rectangle (MB) that could
+be inserted into the index to represent the actual geometrical object.
+
+Then the insertion method is overloaded to support geometry proposal's boxes:
+
+``
+void insert(const geometry::box<Point> &e, const Value & v);
+``
+
+A complete example showing the basic usage of the rtree could be found in
+test/simple_test_rtree.cpp.
+
 [endsect]


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