|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81350 - in sandbox-branches/geometry/index_dev: boost/geometry/extensions/index/rtree doc doc/html doc/html/geometry_index doc/html/geometry_index/r_tree doc/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2012-11-14 18:35:16
Author: awulkiew
Date: 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
New Revision: 81350
URL: http://svn.boost.org/trac/boost/changeset/81350
Log:
remove() don't return if there is no root, assertion check is done in raw_remove().
Docs updated.
Added:
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html (contents, props changed)
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html (contents, props changed)
sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk (contents, props changed)
sandbox-branches/geometry/index_dev/doc/rtree/nearest_query.qbk (contents, props changed)
sandbox-branches/geometry/index_dev/doc/rtree/spatial_query.qbk (contents, props changed)
Removed:
sandbox-branches/geometry/index_dev/doc/rtree/nearest.qbk
sandbox-branches/geometry/index_dev/doc/rtree/query.qbk
Text files modified:
sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp | 8 ------
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html | 18 ++++++++++-----
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html | 39 ++++++++++++++++++-----------------
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html | 14 ++++++------
sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html | 28 +++++++++++-------------
sandbox-branches/geometry/index_dev/doc/html/index.html | 6 +++-
sandbox-branches/geometry/index_dev/doc/rtree.qbk | 5 ++-
sandbox-branches/geometry/index_dev/doc/rtree/creation.qbk | 44 ++++++++++++++++++++++++++++++++++-----
sandbox-branches/geometry/index_dev/doc/rtree/quickstart.qbk | 6 ++--
9 files changed, 101 insertions(+), 67 deletions(-)
Modified: sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp (original)
+++ sandbox-branches/geometry/index_dev/boost/geometry/extensions/index/rtree/rtree.hpp 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -116,7 +116,7 @@
/*!
The constructor.
- \note Exception-safety: basic
+ \note Exception-safety: strong
\param first The beginning of the range of Values.
\param last The end of the range of Values.
@@ -294,9 +294,6 @@
*/
inline void remove(value_type const& value)
{
- if ( !m_root )
- return;
-
this->raw_remove(value);
}
@@ -311,9 +308,6 @@
template <typename Iterator>
inline void remove(Iterator first, Iterator last)
{
- if ( !m_root )
- return;
-
for ( ; first != last ; ++first )
this->raw_remove(*first);
}
Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -29,15 +29,20 @@
<div class="toc"><dl>
<dt><span class="section">Introduction</span></dt>
<dt><span class="section">Quick Start</span></dt>
-<dt><span class="section">R-tree creation</span></dt>
+<dt><span class="section"><a href="r_tree/creation_and_modification.html">Creation
+ and modification</a></span></dt>
<dd><dl>
-<dt><span class="section"><a href="r_tree/r_tree_creation.html#geometry_index.r_tree.r_tree_creation.r_tree_template_parameters">R-tree
- template parameters</a></span></dt>
-<dt><span class="section"><a href="r_tree/r_tree_creation.html#geometry_index.r_tree.r_tree_creation.values__indexables_and_default_translator">Values,
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.template_parameters">Template
+ parameters</a></span></dt>
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.values__indexables_and_default_translator">Values,
Indexables and default Translator</a></span></dt>
-<dt><span class="section"><a href="r_tree/r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_splitting_algorithms">Inserting
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms">Inserting
and splitting algorithms</a></span></dt>
-<dt><span class="section"><a href="r_tree/r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_removing_values">Inserting
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms__run_time_">Inserting
+ and splitting algorithms (run-time)</a></span></dt>
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.copying_and_moving">Copying
+ and moving</a></span></dt>
+<dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_removing_values">Inserting
and removing Values</a></span></dt>
</dl></dd>
<dt><span class="section">Spatial queries</span></dt>
@@ -59,6 +64,7 @@
<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.using_spatial_predicates">Using
spatial predicates</a></span></dt>
</dl></dd>
+<dt><span class="section">Exception safety</span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Added: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/creation_and_modification.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -0,0 +1,225 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Creation and modification</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. Geometry Index">
+<link rel="up" href="../r_tree.html" title="R-tree">
+<link rel="prev" href="rtree_quickstart.html" title="Quick Start">
+<link rel="next" href="spatial_queries.html" title="Spatial queries">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="geometry_index.r_tree.creation_and_modification"></a><a class="link" href="creation_and_modification.html" title="Creation and modification">Creation
+ and modification</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.template_parameters">Template
+ parameters</a></span></dt>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.values__indexables_and_default_translator">Values,
+ Indexables and default Translator</a></span></dt>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms">Inserting
+ and splitting algorithms</a></span></dt>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms__run_time_">Inserting
+ and splitting algorithms (run-time)</a></span></dt>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.copying_and_moving">Copying
+ and moving</a></span></dt>
+<dt><span class="section"><a href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_removing_values">Inserting
+ and removing Values</a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.template_parameters"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.template_parameters" title="Template parameters">Template
+ parameters</a>
+</h4></div></div></div>
+<p>
+ R-tree has 4 parameters:
+ </p>
+<pre class="programlisting"><span class="identifier">rtree</span><span class="special"><</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Parameters</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span>
+</pre>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="computeroutput">Value</code> - type of object which will be stored in the container.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">Parameters</span></code> - compile-time
+ parameters, e.g. inserting/splitting algorithm with min and max nodes'
+ elements numbers.
+ </li>
+<li class="listitem">
+ <code class="computeroutput">Translator</code> - type of object translating <code class="computeroutput"><span class="identifier">Value</span></code> objects to <code class="computeroutput">Indexable</code>
+ objects (<code class="computeroutput">Point</code>
+ or <code class="computeroutput">Box</code>)
+ which R-tree can handle.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">Allocator</span></code> - the allocator.
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.values__indexables_and_default_translator"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.values__indexables_and_default_translator" title="Values, Indexables and default Translator">Values,
+ Indexables and default Translator</a>
+</h4></div></div></div>
+<p>
+ R-tree may store <code class="computeroutput">Value</code>s of any type as long the <code class="computeroutput">Translator</code>
+ is passed as parameter. It knows how to interpret those <code class="computeroutput">Value</code>s
+ and extract an object understandable by the R-tree. Those objects are called
+ <code class="computeroutput">Indexable</code>s. Each type adapted to <code class="computeroutput">Point</code>
+ or <code class="computeroutput">Box</code>
+ concept is an <code class="computeroutput">Indexable</code>. Default <code class="computeroutput">Translator</code>
+ <code class="computeroutput"><span class="identifier">index</span><span class="special">::</span><span class="identifier">translator</span><span class="special">::</span><span class="identifier">def</span><span class="special"><</span><span class="identifier">Value</span><span class="special">></span></code>
+ is able to handle <code class="computeroutput">Point</code>,
+ <code class="computeroutput">Box</code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><...></span></code>,
+ pointer, iterator or smart pointer.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="computeroutput">Indexable <span class="special">=</span> Point
+ <span class="special">|</span> Box</code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">BasicValue</span> <span class="special">=</span>
+ <span class="identifier">Indexable</span> <span class="special">|</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span>Indexable<span class="special">,</span> <span class="identifier">T</span><span class="special">></span> <span class="special">|</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">T</span><span class="special">,</span> Indexable<span class="special">></span></code>
+ </li>
+<li class="listitem">
+ <code class="computeroutput">Value <span class="special">=</span> <span class="identifier">BasicValue</span>
+ <span class="special">|</span> <span class="identifier">BasicValue</span><span class="special">*</span> <span class="special">|</span> <span class="identifier">Iterator</span><span class="special"><</span><span class="identifier">BasicValue</span><span class="special">></span>
+ <span class="special">|</span> <span class="identifier">SmartPtr</span><span class="special"><</span><span class="identifier">BasicValue</span><span class="special">></span></code>
+ </li>
+</ul></div>
+<p>
+ Examples of <code class="computeroutput">Value</code> types:
+ </p>
+<pre class="programlisting"><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point</span><span class="special"><...></span>
+<span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point_xy</span><span class="special"><...></span>
+<span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special"><...></span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special"><...>,</span> <span class="identifier">size_t</span><span class="special">></span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms" title="Inserting and splitting algorithms">Inserting
+ and splitting algorithms</a>
+</h4></div></div></div>
+<p>
+ <code class="computeroutput">Value</code>s may be inserted to the R-tree in many various ways.
+ Final internal structure of the R-tree depends on algorithms used in the
+ insertion process. The most important is nodes' splitting algorithm. Currently,
+ three well-known types of R-trees may be created.
+ </p>
+<p>
+ Linear - classic R-tree using splitting algorithm of linear complexity
+ </p>
+<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">linear</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt</span><span class="special">;</span>
+</pre>
+<p>
+ Quadratic - classic R-tree using splitting algorithm of quadratic complexity
+ </p>
+<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt</span><span class="special">;</span>
+</pre>
+<p>
+ R*-tree - splitting algorithm minimizing nodes' overlap with forced reinsertions
+ </p>
+<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">rstar</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt</span><span class="special">;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms__run_time_"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_splitting_algorithms__run_time_" title="Inserting and splitting algorithms (run-time)">Inserting
+ and splitting algorithms (run-time)</a>
+</h4></div></div></div>
+<p>
+ By default splitting algorithm parameters are passed to the R-tree in compile
+ time. To use run-time versions of the R-tree one may pass parameters defined
+ in index::runtime namespace.
+ </p>
+<pre class="programlisting"><span class="comment">// linear</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span>Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">linear</span><span class="special">></span> <span class="identifier">rt</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">linear</span><span class="special">(</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">));</span>
+<span class="comment">// quadratic</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span>Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special">></span> <span class="identifier">rt</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special">(</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">));</span>
+<span class="comment">// rstar</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span>Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">rstar</span><span class="special">></span> <span class="identifier">rt</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">runtime</span><span class="special">::</span><span class="identifier">rstar</span><span class="special">(</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">));</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.copying_and_moving"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.copying_and_moving" title="Copying and moving">Copying
+ and moving</a>
+</h4></div></div></div>
+<p>
+ The R-tree is copyable and movable container. Move semantics is implemented
+ using Boost.Move library which also supports compilers not supporting rvalue
+ references.
+ </p>
+<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt1</span><span class="special">;</span>
+<span class="comment">// copy constructor</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt2</span><span class="special">;</span>
+<span class="comment">// copy assignment</span>
+<span class="identifier">rt2</span> <span class="special">=</span> <span class="identifier">r1</span><span class="special">;</span>
+<span class="comment">// move constructor</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt3</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">move</span><span class="special">(</span><span class="identifier">rt1</span><span class="special">));</span>
+<span class="comment">// move assignment</span>
+<span class="identifier">rt3</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">move</span><span class="special">(</span><span class="identifier">rt2</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.creation_and_modification.inserting_and_removing_values"></a><a class="link" href="creation_and_modification.html#geometry_index.r_tree.creation_and_modification.inserting_and_removing_values" title="Inserting and removing Values">Inserting
+ and removing Values</a>
+</h4></div></div></div>
+<p>
+ Following code creates an R-tree using quadratic algorithm.
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Box</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> Value<span class="special">;</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special"><</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special"><</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">></span> <span class="special">></span> <span class="identifier">rt</span><span class="special">;</span>
+</pre>
+<p>
+ To insert or remove Value's by method calls one may use the following code.
+ </p>
+<pre class="programlisting">Value <span class="identifier">v</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span>Box<span class="special">(...),</span> <span class="number">0</span><span class="special">);</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">remove</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
+</pre>
+<p>
+ To insert or remove Value's by function calls one may use the following
+ code.
+ </p>
+<pre class="programlisting">Value <span class="identifier">v</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span>Box<span class="special">(...),</span> <span class="number">0</span><span class="special">);</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011, 2012 Adam Wulkiewicz<br>Copyright © 2008 Federico J. Fernandez<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html
Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html
Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html
Modified: sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html
Modified: sandbox-branches/geometry/index_dev/doc/html/index.html
Modified: sandbox-branches/geometry/index_dev/doc/rtree.qbk
Modified: sandbox-branches/geometry/index_dev/doc/rtree/creation.qbk
Added: sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk
Deleted: sandbox-branches/geometry/index_dev/doc/rtree/nearest.qbk
Added: sandbox-branches/geometry/index_dev/doc/rtree/nearest_query.qbk
Deleted: sandbox-branches/geometry/index_dev/doc/rtree/query.qbk
Modified: sandbox-branches/geometry/index_dev/doc/rtree/quickstart.qbk
Added: sandbox-branches/geometry/index_dev/doc/rtree/spatial_query.qbk
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
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/exception_safety.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -0,0 +1,297 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Exception safety</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. Geometry Index">
+<link rel="up" href="../r_tree.html" title="R-tree">
+<link rel="prev" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="geometry_index.r_tree.exception_safety"></a><a class="link" href="exception_safety.html" title="Exception safety">Exception safety</a>
+</h3></div></div></div>
+<p>
+ In order to be exception-safe the R-tree requires:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ Nonthrowing copy constructor of the <code class="computeroutput"><span class="identifier">CoordinateType</span></code>
+ used in the <code class="computeroutput">Indexable</code>,
+ </li>
+<li class="listitem">
+ Nonthrowing destructor of the <code class="computeroutput">Value</code>.
+ </li>
+</ul></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Operation
+ </p>
+ </th>
+<th>
+ <p>
+ exception-safety
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">last</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>strong</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">~</span><span class="identifier">rtree</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">(</span><span class="identifier">rtree</span> <span class="keyword">const</span><span class="special">&)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>strong</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">rtree</span> <span class="keyword">const</span><span class="special">&)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>strong</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">(</span><span class="identifier">rtree</span> <span class="special">&&)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">operator</span><span class="special">=(</span><span class="identifier">rtree</span> <span class="special">&&)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span> or <span class="bold"><strong>strong</strong></span>
+ [a]</sup></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span>Value<span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ basic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">last</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ basic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span>Value<span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ basic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">first</span><span class="special">,</span>
+ <span class="identifier">last</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ basic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">spatial_query</span><span class="special">(...)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>strong</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">nearest_query</span><span class="special">(...)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>strong</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">empty</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">clear</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">box</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">get_allocator</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="emphasis"><em>nothrow</em></span>
+ </p>
+ </td>
+</tr>
+</tbody>
+<tbody class="footnotes"><tr><td colspan="2"><div id="ftn.geometry_index.r_tree.exception_safety.f0" class="footnote"><p>[a]
+ <span class="emphasis"><em>nothrow</em></span> - if allocators are equal, <span class="bold"><strong>strong</strong></span> - if allocators aren't equal
+ </p></div></td></tr></tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011, 2012 Adam Wulkiewicz<br>Copyright © 2008 Federico J. Fernandez<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -7,6 +7,7 @@
<link rel="home" href="../../index.html" title="Chapter 1. Geometry Index">
<link rel="up" href="../r_tree.html" title="R-tree">
<link rel="prev" href="spatial_queries.html" title="Spatial queries">
+<link rel="next" href="exception_safety.html" title="Exception safety">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -19,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
@@ -52,20 +53,20 @@
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span>Value<span class="special">></span> <span class="identifier">returned_values</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
<p>
Function call
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span>Value<span class="special">></span> <span class="identifier">returned_values</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
<p>
Use of <code class="computeroutput"><span class="keyword">operator</span> <span class="special">|</span></code>
</p>
<pre class="programlisting">Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_filtered</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">))</span>
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">nearest_queried</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">))</span>
<span class="special">;</span> <span class="comment">// do something with v</span>
</pre>
</div>
@@ -84,14 +85,14 @@
</p>
<pre class="programlisting">Value <span class="identifier">returned_value</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
+<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
</pre>
<p>
Function call
</p>
<pre class="programlisting">Value <span class="identifier">Value</span> <span class="identifier">returned_value</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
+<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
</pre>
</div>
<div class="section">
@@ -109,19 +110,19 @@
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
<span class="comment">/* default - without bounds */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* same as default */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">unbounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">unbounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* distance must be greater than or equal to 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* distance must be lesser than or equal to 500 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">max_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">max_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* distance must be between 10 and 500 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
<p>
Furthermore, it's possible to define if the closest, furthest or centroidal
@@ -133,19 +134,19 @@
<span class="comment">/* default - distance between Indexable's closest point and a query point
must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* same as default - distance between Indexable's closest point and a query point
must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* distance between Indexable's furthest point and a query point
must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
<span class="comment">/* distance between Indexable's centroid and a query point
must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
</div>
<div class="section">
@@ -163,11 +164,11 @@
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_point.html" target="_top">Point</a> <span class="identifier">pt</span><span class="special">(...);</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_box.html" target="_top">Box</a> <span class="identifier">b</span><span class="special">(...);</span>
-<span class="identifier">size_t</span> <span class="identifier">n1</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">returned_value</span><span class="special">);</span>
+<span class="identifier">size_t</span> <span class="identifier">n1</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">returned_value</span><span class="special">);</span>
-<span class="identifier">size_t</span> <span class="identifier">n2</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">size_t</span> <span class="identifier">n2</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span><span class="identifier">Value</span> <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_filtered</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">(</span><span class="identifier">b</span><span class="special">)))</span>
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span><span class="identifier">Value</span> <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">nearest_queried</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">(</span><span class="identifier">b</span><span class="special">)))</span>
<span class="special">;</span> <span class="comment">// do something with v</span>
</pre>
</div>
@@ -182,7 +183,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="exception_safety.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/rtree_quickstart.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -7,7 +7,7 @@
<link rel="home" href="../../index.html" title="Chapter 1. Geometry Index">
<link rel="up" href="../r_tree.html" title="R-tree">
<link rel="prev" href="introduction.html" title="Introduction">
-<link rel="next" href="r_tree_creation.html" title="R-tree creation">
+<link rel="next" href="creation_and_modification.html" title="Creation and modification">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="r_tree_creation.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
@@ -86,14 +86,14 @@
<p>
</p>
<p>
- There are various types of queries that may be performed, they can be even
- combined together in one call. For simplicity, default one is used.
+ There are various types of spatial queries that may be performed, they can
+ be even combined together in one call. For simplicity, default one is used.
</p>
<p>
</p>
<pre class="programlisting"><span class="comment">// find values intersecting a box</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">value</span><span class="special">></span> <span class="identifier">result</span><span class="special">;</span>
-<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">b</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
</pre>
<p>
</p>
@@ -103,7 +103,7 @@
<p>
</p>
<pre class="programlisting"><span class="comment">// find 5 nearest values to a point</span>
-<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">point</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">),</span> <span class="number">5</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">point</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">),</span> <span class="number">5</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
</pre>
<p>
</p>
@@ -126,7 +126,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="r_tree_creation.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/geometry_index/r_tree/spatial_queries.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="../../index.html" title="Chapter 1. Geometry Index">
<link rel="up" href="../r_tree.html" title="R-tree">
-<link rel="prev" href="r_tree_creation.html" title="R-tree creation">
+<link rel="prev" href="creation_and_modification.html" title="Creation and modification">
<link rel="next" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="r_tree_creation.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
@@ -46,20 +46,20 @@
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span>Value<span class="special">></span> <span class="identifier">returned_values</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_box.html" target="_top">Box</a> <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">box_region</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">box_region</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
<p>
Function call
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span>Value<span class="special">></span> <span class="identifier">returned_values</span><span class="special">;</span>
<a href="http://www.boost.org/libs/geometry/doc/html/geometry/reference/concepts/concept_box.html" target="_top">Box</a> <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">box_region</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">box_region</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">returned_values</span><span class="special">));</span>
</pre>
<p>
Use of pipe operator generating a range
</p>
<pre class="programlisting">Box <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">query_filtered</span><span class="special">(</span><span class="identifier">box_region</span><span class="special">))</span>
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</span> <span class="special">|</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">spatial_queried</span><span class="special">(</span><span class="identifier">box_region</span><span class="special">))</span>
<span class="special">;</span> <span class="comment">// do something with v</span>
</pre>
</div>
@@ -75,7 +75,7 @@
algorithms.
</p>
<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">box</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span> <span class="comment">// default case - intersects</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span> <span class="comment">// same as default</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span> <span class="comment">// the same as default</span>
<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjont</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
@@ -84,23 +84,21 @@
<p>
All predicates may be negated, e.g.:
</p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">not_intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
-<span class="comment">// or</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
<span class="comment">// the same as</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjoint</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjoint</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
</pre>
<p>
It's possible to use some number of predicates by passing <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Pred1</span><span class="special">,</span> <span class="identifier">Pred2</span><span class="special">></span></code>
</p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">),</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</span><span class="special">))</span>
<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
</pre>
<p>
or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">Pred1</span><span class="special">,</span> <span class="identifier">Pred2</span><span class="special">,</span> <span class="identifier">Pred3</span><span class="special">,</span> <span class="special">...></span></code>
</p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
<span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">),</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box3</span><span class="special">))</span>
<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
@@ -116,9 +114,9 @@
<span class="comment">// ...</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span><span class="special">(</span><span class="identifier">fun</span><span class="special">))</span>
- <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
</pre>
</div>
</div>
@@ -132,7 +130,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="r_tree_creation.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/html/index.html (original)
+++ sandbox-branches/geometry/index_dev/doc/html/index.html 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -45,16 +45,18 @@
<dd><dl>
<dt><span class="section">Introduction</span></dt>
<dt><span class="section">Quick Start</span></dt>
-<dt><span class="section">R-tree creation</span></dt>
+<dt><span class="section"><a href="geometry_index/r_tree/creation_and_modification.html">Creation
+ and modification</a></span></dt>
<dt><span class="section">Spatial queries</span></dt>
<dt><span class="section"><a href="geometry_index/r_tree/nearest_neighbours_queries.html">Nearest
neighbours queries</a></span></dt>
+<dt><span class="section">Exception safety</span></dt>
</dl></dd>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 04, 2012 at 18:00:33 GMT</small></p></td>
+<td align="left"><p><small>Last revised: November 14, 2012 at 23:30:31 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree.qbk (original)
+++ sandbox-branches/geometry/index_dev/doc/rtree.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -13,7 +13,8 @@
[include rtree/introduction.qbk]
[include rtree/quickstart.qbk]
[include rtree/creation.qbk]
-[include rtree/query.qbk]
-[include rtree/nearest.qbk]
+[include rtree/spatial_query.qbk]
+[include rtree/nearest_query.qbk]
+[include rtree/exception_safety.qbk]
[endsect]
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree/creation.qbk (original)
+++ sandbox-branches/geometry/index_dev/doc/rtree/creation.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -8,19 +8,19 @@
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
-[section R-tree creation]
+[section Creation and modification]
-[section R-tree template parameters]
+[section Template parameters]
__rtree__ has 4 parameters:
rtree<Value, Parameters, Translator, Allocator>
-* `Value` - type of object which will be stored in the container.
+* `__value__` - type of object which will be stored in the container.
* `Parameters` - compile-time parameters, e.g. inserting/splitting
algorithm with min and max nodes' elements numbers.
-* `Translator` - type of object translating `Value` objects to
- `Indexable` objects (`__point__` or `__box__`) which __rtree__ can handle.
+* `__translator__` - type of object translating `Value` objects to
+ `__indexable__` objects (`__point__` or `__box__`) which __rtree__ can handle.
* `Allocator` - the allocator.
[endsect]
@@ -68,6 +68,38 @@
[endsect]
+[section Inserting and splitting algorithms (run-time)]
+
+By default splitting algorithm parameters are passed to the __rtree__ in compile time.
+To use run-time versions of the __rtree__ one may pass parameters defined in index::runtime
+namespace.
+
+ // linear
+ index::rtree<__value__, index::runtime::linear> rt(index::runtime::linear(32, 8));
+ // quadratic
+ index::rtree<__value__, index::runtime::quadratic> rt(index::runtime::quadratic(32, 8));
+ // rstar
+ index::rtree<__value__, index::runtime::rstar> rt(index::runtime::rstar(32, 8));
+
+[endsect]
+
+[section Copying and moving]
+
+The __rtree__ is copyable and movable container. Move semantics is implemented using Boost.Move library
+which also supports compilers not supporting rvalue references.
+
+ index::rtree< __value__, index::quadratic<32, 8> > rt1;
+ // copy constructor
+ index::rtree< __value__, index::quadratic<32, 8> > rt2;
+ // copy assignment
+ rt2 = r1;
+ // move constructor
+ index::rtree< __value__, index::quadratic<32, 8> > rt3(boost::move(rt1));
+ // move assignment
+ rt3 = boost::move(rt2);
+
+[endsect]
+
[section Inserting and removing Values]
Following code creates an __rtree__ using quadratic algorithm.
@@ -92,4 +124,4 @@
[endsect]
-[endsect] [/ R-tree creation /]
+[endsect] [/ Creation and modification /]
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/doc/rtree/exception_safety.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -0,0 +1,40 @@
+[/============================================================================
+ Boost.Geometry Index
+
+ Copyright (c) 2011-2012 Adam Wulkiewicz.
+
+ Use, modification and distribution is subject to the Boost Software License,
+ Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================/]
+
+[section Exception safety]
+
+In order to be exception-safe the __rtree__ requires:
+
+* Nonthrowing copy constructor of the `CoordinateType` used in the `__indexable__`,
+* Nonthrowing destructor of the `__value__`.
+
+[table
+[[Operation] [exception-safety]]
+[[`rtree()`] [ /nothrow/ ]]
+[[`rtree(first, last)`] [ *strong* ]]
+[[`~rtree()`] [ /nothrow/ ]]
+[[`rtree(rtree const&)`] [ *strong* ]]
+[[`operator=(rtree const&)`] [ *strong* ]]
+[[`rtree(rtree &&)`] [ /nothrow/ ]]
+[[`operator=(rtree &&)`] [ /nothrow/ or *strong* [footnote /nothrow/ - if allocators are equal, *strong* - if allocators aren't equal ]]]
+[[`insert(__value__)`] [ basic ]]
+[[`insert(first, last)`] [ basic ]]
+[[`remove(__value__)`] [ basic ]]
+[[`remove(first, last)`] [ basic ]]
+[[`spatial_query(...)`] [ *strong* ]]
+[[`nearest_query(...)`] [ *strong* ]]
+[[`size()`] [ /nothrow/ ]]
+[[`empty()`] [ /nothrow/ ]]
+[[`clear()`] [ /nothrow/ ]]
+[[`box()`] [ /nothrow/ ]]
+[[`get_allocator()`] [ /nothrow/ ]]
+]
+
+[endsect] [/Exception safety/]
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree/nearest.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
+++ (empty file)
@@ -1,126 +0,0 @@
-[/============================================================================
- Boost.Geometry Index
-
- Copyright (c) 2011-2012 Adam Wulkiewicz.
-
- Use, modification and distribution is subject to the Boost Software License,
- Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================/]
-
-[section Nearest neighbours queries]
-
-[section k nearest neighbours]
-
-There are three ways of performing knn queries. Following queries returns
-k `__value__`s closest to some point in space. For `__box__`es
-`__indexable__`s the distance to the nearest point is calculated by default.
-
-Method call
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
- rt.nearest(pt, k, std::back_inserter(returned_values));
-
-Function call
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
- index::nearest(rt, pt, k, std::back_inserter(returned_values));
-
-Use of `operator |`
-
- __point__ pt(...);
- BOOST_FOREACH(__value__ & v, rt | index::nearest_filtered(pt, k))
- ; // do something with v
-
-[endsect]
-
-[section One nearest neighbour]
-
-Another type of nearest neighbour query is searching for the one closest `__value__`.
-If it is found, 1 is returned by the method or function. This kind of query
-has only two forms.
-
-Method call
-
- __value__ returned_value;
- __point__ pt(...);
- size_t n = rt.nearest(pt, returned_value);
-
-Function call
-
- __value__ Value returned_value;
- __point__ pt(...);
- size_t n = index::nearest(rt, pt, returned_value);
-
-[endsect]
-
-[section Distances predicates]
-
-It is possible to define if calculated distance between query point and `__value__` should be
-greater, lesser or between some other distances. Those are called `DistancesPredicate`s and
-may be defined as follows.
-
- std::vector<__Value__> returned_values;
- __point__ pt(...);
-
- /* default - without bounds */
- index::nearest(rt, pt, k, std::back_inserter(returned_values));
-
- /* same as default */
- index::nearest(rt, index::unbounded(pt), k, std::back_inserter(returned_values));
-
- /* distance must be greater than or equal to 10 */
- index::nearest(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
-
- /* distance must be lesser than or equal to 500 */
- index::nearest(rt, index::max_bounded(pt, 500), k, std::back_inserter(returned_values));
-
- /* distance must be between 10 and 500 */
- index::nearest(rt, index::bounded(pt, 10, 500), k, std::back_inserter(returned_values));
-
-Furthermore, it's possible to define if the closest, furthest or centroidal point of the
-non-point `__indexable__` should be taken into account in the routine calculating distance.
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
-
- /* default - distance between Indexable's closest point and a query point
- must be greater than 10 */
- index::nearest(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
-
- /* same as default - distance between Indexable's closest point and a query point
- must be greater than 10 */
- index::nearest(rt, index::min_bounded(pt, index::to_nearest(10)), k, std::back_inserter(returned_values));
-
- /* distance between Indexable's furthest point and a query point
- must be greater than 10 */
- index::nearest(rt, index::min_bounded(pt, index::to_furthest(10)), k, std::back_inserter(returned_values));
-
- /* distance between Indexable's centroid and a query point
- must be greater than 10 */
- index::nearest(rt, index::min_bounded(pt, index::to_centroid(10)), k, std::back_inserter(returned_values));
-
-[endsect]
-
-[section Using spatial predicates]
-
-It is possible to use spatial predicates described before in nearest neighbours queries.
-
- __value__ returned_value;
- std::vector<__value__> returned_values;
-
- __point__ pt(...);
- __box__ b(...);
-
- size_t n1 = rt.nearest(index::bounded(pt, index::to_furthest(1), 10), index::intersects(b), returned_value);
-
- size_t n2 = index::nearest(rt, pt, k, index::within(b), std::back_inserter(returned_values));
-
- BOOST_FOREACH(Value & v, rt | index::nearest_filtered(pt, k, index::covered_by(b)))
- ; // do something with v
-
-[endsect]
-
-[endsect] [/ Nearest neighbours queries /]
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/doc/rtree/nearest_query.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -0,0 +1,126 @@
+[/============================================================================
+ Boost.Geometry Index
+
+ Copyright (c) 2011-2012 Adam Wulkiewicz.
+
+ Use, modification and distribution is subject to the Boost Software License,
+ Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================/]
+
+[section Nearest neighbours queries]
+
+[section k nearest neighbours]
+
+There are three ways of performing knn queries. Following queries returns
+k `__value__`s closest to some point in space. For `__box__`es
+`__indexable__`s the distance to the nearest point is calculated by default.
+
+Method call
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+ rt.nearest_query(pt, k, std::back_inserter(returned_values));
+
+Function call
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+ index::nearest_query(rt, pt, k, std::back_inserter(returned_values));
+
+Use of `operator |`
+
+ __point__ pt(...);
+ BOOST_FOREACH(__value__ & v, rt | index::adaptors::nearest_queried(pt, k))
+ ; // do something with v
+
+[endsect]
+
+[section One nearest neighbour]
+
+Another type of nearest neighbour query is searching for the one closest `__value__`.
+If it is found, 1 is returned by the method or function. This kind of query
+has only two forms.
+
+Method call
+
+ __value__ returned_value;
+ __point__ pt(...);
+ size_t n = rt.nearest_query(pt, returned_value);
+
+Function call
+
+ __value__ Value returned_value;
+ __point__ pt(...);
+ size_t n = index::nearest_query(rt, pt, returned_value);
+
+[endsect]
+
+[section Distances predicates]
+
+It is possible to define if calculated distance between query point and `__value__` should be
+greater, lesser or between some other distances. Those are called `DistancesPredicate`s and
+may be defined as follows.
+
+ std::vector<__Value__> returned_values;
+ __point__ pt(...);
+
+ /* default - without bounds */
+ index::nearest_query(rt, pt, k, std::back_inserter(returned_values));
+
+ /* same as default */
+ index::nearest_query(rt, index::unbounded(pt), k, std::back_inserter(returned_values));
+
+ /* distance must be greater than or equal to 10 */
+ index::nearest_query(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
+
+ /* distance must be lesser than or equal to 500 */
+ index::nearest_query(rt, index::max_bounded(pt, 500), k, std::back_inserter(returned_values));
+
+ /* distance must be between 10 and 500 */
+ index::nearest_query(rt, index::bounded(pt, 10, 500), k, std::back_inserter(returned_values));
+
+Furthermore, it's possible to define if the closest, furthest or centroidal point of the
+non-point `__indexable__` should be taken into account in the routine calculating distance.
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+
+ /* default - distance between Indexable's closest point and a query point
+ must be greater than 10 */
+ index::nearest_query(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
+
+ /* same as default - distance between Indexable's closest point and a query point
+ must be greater than 10 */
+ index::nearest_query(rt, index::min_bounded(pt, index::to_nearest(10)), k, std::back_inserter(returned_values));
+
+ /* distance between Indexable's furthest point and a query point
+ must be greater than 10 */
+ index::nearest_query(rt, index::min_bounded(pt, index::to_furthest(10)), k, std::back_inserter(returned_values));
+
+ /* distance between Indexable's centroid and a query point
+ must be greater than 10 */
+ index::nearest_query(rt, index::min_bounded(pt, index::to_centroid(10)), k, std::back_inserter(returned_values));
+
+[endsect]
+
+[section Using spatial predicates]
+
+It is possible to use spatial predicates described before in nearest neighbours queries.
+
+ __value__ returned_value;
+ std::vector<__value__> returned_values;
+
+ __point__ pt(...);
+ __box__ b(...);
+
+ size_t n1 = rt.nearest_query(index::bounded(pt, index::to_furthest(1), 10), index::intersects(b), returned_value);
+
+ size_t n2 = index::nearest_query(rt, pt, k, index::within(b), std::back_inserter(returned_values));
+
+ BOOST_FOREACH(Value & v, rt | index::adaptors::nearest_queried(pt, k, index::covered_by(b)))
+ ; // do something with v
+
+[endsect]
+
+[endsect] [/ Nearest neighbours queries /]
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree/query.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
+++ (empty file)
@@ -1,86 +0,0 @@
-[/============================================================================
- Boost.Geometry Index
-
- Copyright (c) 2011-2012 Adam Wulkiewicz.
-
- Use, modification and distribution is subject to the Boost Software License,
- Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================/]
-
-[section Spatial queries]
-
-[section Basic queries]
-
-There are three ways to perform a spatial query. Following queries returns
-`__value__`s intersecting some box_region.
-
-Method call
-
- std::vector<__value__> returned_values;
- __box__ box_region(...);
- rt.query(box_region, std::back_inserter(returned_values));
-
-Function call
-
- std::vector<__value__> returned_values;
- __box__ box_region(...);
- index::query(rt, box_region, std::back_inserter(returned_values));
-
-Use of pipe operator generating a range
-
- __box__ box_region(...);
- BOOST_FOREACH(__value__ & v, rt | index::query_filtered(box_region))
- ; // do something with v
-[endsect]
-
-[section Spatial predicates]
-
-It is possible to define other relations between queried `__value__`s and region/regions
-of interest. Names of predicates corresponds to names of __boost_geometry__ algorithms.
-
- rt.query(box, std::back_inserter(result)); // default case - intersects
- rt.query(index::intersects(box), std::back_inserter(result)); // same as default
- rt.query(index::covered_by(box), std::back_inserter(result));
- rt.query(index::disjont(box), std::back_inserter(result));
- rt.query(index::overlaps(box), std::back_inserter(result));
- rt.query(index::within(box), std::back_inserter(result));
-
-All predicates may be negated, e.g.:
-
- rt.query(index::not_intersects(box), std::back_inserter(result));
- // or
- rt.query(!index::intersects(box), std::back_inserter(result));
- // the same as
- rt.query(index::disjoint(box), std::back_inserter(result));
-
-It's possible to use some number of predicates by passing `std::pair<Pred1, Pred2>`
-
- rt.query(
- std::make_pair(index::intersects(box1), !index::within(box2))
- , std::back_inserter(result));
-
-or `boost::tuple<Pred1, Pred2, Pred3, ...>`
-
- rt.query(
- boost::make_tuple(
- index::intersects(box1), !index::within(box2), index::overlaps(box3))
- , std::back_inserter(result));
-
-There is also a unique predicate `index::value(...)` taking user-defined function/functor
-which checks if `__value__` should be returned by the query.
-
- bool fun(__value__ const& v)
- {
- return v.is_red();
- }
-
- // ...
-
- rt.query(
- boost::make_pair(index::intersects(box), index::value(fun))
- , std::back_inserter(result));
-
-[endsect]
-
-[endsect] [/ Spatial queries /]
==============================================================================
--- sandbox-branches/geometry/index_dev/doc/rtree/quickstart.qbk (original)
+++ sandbox-branches/geometry/index_dev/doc/rtree/quickstart.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -31,14 +31,14 @@
[rtree_quickstart_insert]
-There are various types of queries that may be performed, they can be even combined together
+There are various types of spatial queries that may be performed, they can be even combined together
in one call. For simplicity, default one is used.
-[rtree_quickstart_query]
+[rtree_quickstart_spatial_query]
Default k-nearest neighbors query may be performed as follows.
-[rtree_quickstart_nearest]
+[rtree_quickstart_nearest_query]
[h3 More]
More information about the R-tree implementation, other algorithms and queries may be found in
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index_dev/doc/rtree/spatial_query.qbk 2012-11-14 18:35:14 EST (Wed, 14 Nov 2012)
@@ -0,0 +1,84 @@
+[/============================================================================
+ Boost.Geometry Index
+
+ Copyright (c) 2011-2012 Adam Wulkiewicz.
+
+ Use, modification and distribution is subject to the Boost Software License,
+ Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================/]
+
+[section Spatial queries]
+
+[section Basic queries]
+
+There are three ways to perform a spatial query. Following queries returns
+`__value__`s intersecting some box_region.
+
+Method call
+
+ std::vector<__value__> returned_values;
+ __box__ box_region(...);
+ rt.spatial_query(box_region, std::back_inserter(returned_values));
+
+Function call
+
+ std::vector<__value__> returned_values;
+ __box__ box_region(...);
+ index::spatial_query(rt, box_region, std::back_inserter(returned_values));
+
+Use of pipe operator generating a range
+
+ __box__ box_region(...);
+ BOOST_FOREACH(__value__ & v, rt | index::adaptors::spatial_queried(box_region))
+ ; // do something with v
+[endsect]
+
+[section Spatial predicates]
+
+It is possible to define other relations between queried `__value__`s and region/regions
+of interest. Names of predicates corresponds to names of __boost_geometry__ algorithms.
+
+ rt.query(box, std::back_inserter(result)); // default case - intersects
+ rt.query(index::intersects(box), std::back_inserter(result)); // the same as default
+ rt.query(index::covered_by(box), std::back_inserter(result));
+ rt.query(index::disjont(box), std::back_inserter(result));
+ rt.query(index::overlaps(box), std::back_inserter(result));
+ rt.query(index::within(box), std::back_inserter(result));
+
+All predicates may be negated, e.g.:
+
+ rt.spatial_query(!index::intersects(box), std::back_inserter(result));
+ // the same as
+ rt.spatial_query(index::disjoint(box), std::back_inserter(result));
+
+It's possible to use some number of predicates by passing `std::pair<Pred1, Pred2>`
+
+ rt.spatial_query(
+ std::make_pair(index::intersects(box1), !index::within(box2))
+ , std::back_inserter(result));
+
+or `boost::tuple<Pred1, Pred2, Pred3, ...>`
+
+ rt.spatial_query(
+ boost::make_tuple(
+ index::intersects(box1), !index::within(box2), index::overlaps(box3))
+ , std::back_inserter(result));
+
+There is also a unique predicate `index::value(...)` taking user-defined function/functor
+which checks if `__value__` should be returned by the query.
+
+ bool fun(__value__ const& v)
+ {
+ return v.is_red();
+ }
+
+ // ...
+
+ rt.spatial_query(
+ boost::make_pair(index::intersects(box), index::value(fun))
+ , std::back_inserter(result));
+
+[endsect]
+
+[endsect] [/ Spatial queries /]