Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84218 - in trunk/libs/geometry/doc/index: rtree src/examples/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-05-10 08:10:19


Author: awulkiew
Date: 2013-05-10 08:10:18 EDT (Fri, 10 May 2013)
New Revision: 84218
URL: http://svn.boost.org/trac/boost/changeset/84218

Log:
geometry.index doc: newly implemented default Min rtree elements used, sections slightly modified.
Text files modified:
   trunk/libs/geometry/doc/index/rtree/creation.qbk | 48 ++++++++++++++++++++--------------------
   trunk/libs/geometry/doc/index/rtree/introduction.qbk | 6 ----
   trunk/libs/geometry/doc/index/rtree/quickstart.qbk | 2
   trunk/libs/geometry/doc/index/src/examples/rtree/quick_start.cpp | 2
   4 files changed, 27 insertions(+), 31 deletions(-)

Modified: trunk/libs/geometry/doc/index/rtree/creation.qbk
==============================================================================
--- trunk/libs/geometry/doc/index/rtree/creation.qbk (original)
+++ trunk/libs/geometry/doc/index/rtree/creation.qbk 2013-05-10 08:10:18 EDT (Fri, 10 May 2013)
@@ -65,7 +65,9 @@
 
 [endsect]
 
-[section Balancing algorithms (compile-time)]
+[section Balancing algorithms]
+
+[heading Compile-time]
 
 `__value__`s may be inserted to the __rtree__ in many various ways. Final internal structure
 of the __rtree__ depends on algorithms used in the insertion process and parameters. The most important is
@@ -73,53 +75,55 @@
 
 Linear - classic __rtree__ using balancing algorithm of linear complexity
 
- index::rtree< __value__, index::linear<16, 4> > rt;
+ index::rtree< __value__, index::linear<16> > rt;
 
 Quadratic - classic __rtree__ using balancing algorithm of quadratic complexity
 
- index::rtree< __value__, index::quadratic<16, 4> > rt;
+ index::rtree< __value__, index::quadratic<16> > rt;
 
 R*-tree - balancing algorithm minimizing nodes' overlap with forced reinsertions
  
- index::rtree< __value__, index::rstar<16, 4> > rt;
-
-[endsect]
+ index::rtree< __value__, index::rstar<16> > rt;
 
-[section Balancing algorithms (run-time)]
+[heading Run-time]
 
-Balancing algorithm parameters may be passed to the __rtree__ in run time.
+Balancing algorithm parameters may be passed to the __rtree__ in run-time.
 To use run-time versions of the __rtree__ one may pass parameters which
 names start with `dynamic_`.
 
  // linear
- index::rtree<__value__, index::dynamic_linear> rt(index::dynamic_linear(16, 4));
+ index::rtree<__value__, index::dynamic_linear> rt(index::dynamic_linear(16));
 
  // quadratic
- index::rtree<__value__, index::dynamic_quadratic> rt(index::dynamic_quadratic(16, 4));
+ index::rtree<__value__, index::dynamic_quadratic> rt(index::dynamic_quadratic(16));
 
  // rstar
- index::rtree<__value__, index::dynamic_rstar> rt(index::dynamic_rstar(16, 4));
+ index::rtree<__value__, index::dynamic_rstar> rt(index::dynamic_rstar(16));
 
 The obvious drawback is a slightly slower __rtree__.
 
+[heading Non-default parameters]
+
+Non-default R-tree parameters are described in the reference.
+
 [endsect]
 
 [section Copying, moving and swapping]
 
 The __rtree__ is copyable and movable container. Move semantics is implemented using Boost.Move library
-which also supports compilers not supporting rvalue references.
+so it's possible to move the container on a compilers without rvalue references support.
 
  // default constructor
- index::rtree< __value__, index::linear<32, 8> > rt1;
+ index::rtree< __value__, index::rstar<8> > rt1;
 
  // copy constructor
- index::rtree< __value__, index::quadratic<16, 4> > rt2(r1);
+ index::rtree< __value__, index::rstar<8> > rt2(r1);
 
  // copy assignment
  rt2 = r1;
 
  // move constructor
- index::rtree< __value__, index::quadratic<8, 3> > rt3(boost::move(rt1));
+ index::rtree< __value__, index::rstar<8> > rt3(boost::move(rt1));
 
  // move assignment
  rt3 = boost::move(rt2);
@@ -135,7 +139,7 @@
 
  using namespace boost::geometry;
  typedef std::pair<Box, int> __value__;
- index::rtree< __value__, index::quadratic<32, 8> > rt;
+ index::rtree< __value__, index::quadratic<16> > rt;
 
 To insert or remove a `__value__' by method call one may use the following
 code.
@@ -159,16 +163,14 @@
 some number of `__value__`s corresponding to geometrical objects (e.g. `Polygons`)
 stored in another container.
 
-[endsect]
-
-[section Additional interface]
+[heading Additional interface]
 
 The __rtree__ allows creation, inserting and removing of Values from a range. The range may be passed as
 [first, last) Iterators pair or as a Range.
 
  namespace bgi = boost::geometry::index;
  typedef std::pair<Box, int> __value__;
- typedef bgi::rtree< __value__, bgi::linear<32, 8> > RTree;
+ typedef bgi::rtree< __value__, bgi::linear<32> > RTree;
 
  std::vector<__value__> values;
  /* vector filling code, here */
@@ -202,9 +204,7 @@
  // remove values with remove(Range)
  rt3.remove(values);
 
-[endsect]
-
-[section Insert iterator]
+[heading Insert iterator]
 
 There are functions like `std::copy()`, or __rtree__'s queries that copy values to an output iterator.
 In order to insert values to a container in this kind of function insert iterators may be used.
@@ -213,7 +213,7 @@
 
  namespace bgi = boost::geometry::index;
  typedef std::pair<Box, int> __value__;
- typedef bgi::rtree< __value__, bgi::linear<32, 8> > RTree;
+ typedef bgi::rtree< __value__, bgi::linear<32> > RTree;
 
  std::vector<__value__> values;
  /* vector filling code, here */

Modified: trunk/libs/geometry/doc/index/rtree/introduction.qbk
==============================================================================
--- trunk/libs/geometry/doc/index/rtree/introduction.qbk (original)
+++ trunk/libs/geometry/doc/index/rtree/introduction.qbk 2013-05-10 08:10:18 EDT (Fri, 10 May 2013)
@@ -18,14 +18,10 @@
 
 The __rtree__ structure is presented on the image below. Each __rtree__'s node store a box descring the space occupied by
 its children nodes. At the bottom of the structure, there are leaf-nodes which contains values
-(geometric objects representations).
+(geometric objects representations).
 
 [$img/index/rtree/rstar.png]
 
-The number of maximum and mininimum node's elements must be specified by the user. If the number of elements reaches it's maximum
-the new node is created and elements are split between nodes. If the number of elements in node is too small, the node is deleted
-and elements are reinserted into the tree.
-
 The __rtree__ is a self-balanced data structure. The key part of balancing algorithm is node splitting algorithm
 [footnote Greene, D. (1989). /An implementation and performance analysis of spatial data access methods/]
 [footnote Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). /The R*-tree: an efficient and robust access method for points and rectangles/].

Modified: trunk/libs/geometry/doc/index/rtree/quickstart.qbk
==============================================================================
--- trunk/libs/geometry/doc/index/rtree/quickstart.qbk (original)
+++ trunk/libs/geometry/doc/index/rtree/quickstart.qbk 2013-05-10 08:10:18 EDT (Fri, 10 May 2013)
@@ -26,7 +26,7 @@
 
 R-tree may be created using various algorithm and parameters. You should choose the algorithm you'll
 find the best for your purpose. In this example we will use quadratic algorithm. Parameters are
-passed as template parameters. Maximum number of elements in nodes are set to 32, minimum to 8.
+passed as template parameters. Maximum number of elements in nodes is set to 16.
 
 [rtree_quickstart_create]
 

Modified: trunk/libs/geometry/doc/index/src/examples/rtree/quick_start.cpp
==============================================================================
--- trunk/libs/geometry/doc/index/src/examples/rtree/quick_start.cpp (original)
+++ trunk/libs/geometry/doc/index/src/examples/rtree/quick_start.cpp 2013-05-10 08:10:18 EDT (Fri, 10 May 2013)
@@ -39,7 +39,7 @@
 
     //[rtree_quickstart_create
     // create the rtree using default constructor
- bgi::rtree< value, bgi::quadratic<16, 4> > rtree;
+ bgi::rtree< value, bgi::quadratic<16> > rtree;
     //]
 
     //[rtree_quickstart_insert


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