mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
Predicates and DistancePredicates are stored by value in visitors. Each predicate is stored by value in expression tuple. Examples and docs updated. [SVN r83232]
831 lines
32 KiB
Plaintext
831 lines
32 KiB
Plaintext
[/ Generated by doxygen_xml2qbk, don't change, will be overwritten automatically]
|
|
[/ Generated from xml/classboost_1_1geometry_1_1index_1_1rtree.xml]
|
|
[#classboost_1_1geometry_1_1index_1_1rtree]
|
|
[section boost::geometry::index::rtree]
|
|
|
|
The R-tree spatial index.
|
|
|
|
[heading Description]
|
|
This is self-balancing spatial index capable to store various types of Values and balancing algorithms.
|
|
|
|
[heading Parameters]
|
|
The user must pass a type defining the Parameters which will be used in rtree creation process. This type is used e.g. to specify balancing algorithm with specific parameters like min and max number of elements in node.
|
|
|
|
|
|
|
|
|
|
Predefined algorithms with compile-time parameters are:
|
|
|
|
* [^[link structboost_1_1geometry_1_1index_1_1linear boost::geometry::index::linear]],
|
|
* [^[link structboost_1_1geometry_1_1index_1_1quadratic boost::geometry::index::quadratic]],
|
|
* [^[link structboost_1_1geometry_1_1index_1_1rstar boost::geometry::index::rstar]].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Predefined algorithms with run-time parameters are:
|
|
|
|
* [^[link classboost_1_1geometry_1_1index_1_1dynamic__linear boost::geometry::index::dynamic_linear]],
|
|
* [^[link classboost_1_1geometry_1_1index_1_1dynamic__quadratic boost::geometry::index::dynamic_quadratic]],
|
|
* [^[link classboost_1_1geometry_1_1index_1_1dynamic__rstar boost::geometry::index::dynamic_rstar]].
|
|
|
|
|
|
|
|
[heading Translator]
|
|
The Translator translates from Value to Indexable each time r-tree requires it. Which means that this operation is done for each Value access. Therefore the Translator should return the Indexable by const reference instead of a value. Default translator can translate all types adapted to Point or Box concepts (called Indexables). It also handles [^`std::pair<Indexable, T>`] and [^`boost::tuple<Indexable, ...>`]. For example, if [^`std::pair<Box, int>`] is stored in the container, the default translator translates from [^`std::pair<Box, int> const&`] to [^`Box const&`].
|
|
|
|
[heading Header]
|
|
`#include <boost/geometry/index/rtree.hpp>`
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
`template<``typename Value``,`
|
|
`typename Parameters``,`
|
|
`typename Translator` = [^[link structboost_1_1geometry_1_1index_1_1translator index::translator]]`<Value>``,`
|
|
`typename Allocator` = `std::allocator<Value>``>`
|
|
`class rtree`
|
|
`{`
|
|
` // ...`
|
|
`};`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Value`][The type of objects stored in the container. ]]
|
|
[[`Parameters`][Compile-time parameters. ]]
|
|
[[`Translator`][The type of the translator which translates from Value to Indexable. ]]
|
|
[[`Allocator`][The allocator used to allocate/deallocate memory, construct/destroy nodes and Values. ]]
|
|
]
|
|
|
|
[heading Typedef(s)]
|
|
[table
|
|
[[Type] [Description]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb] `value_type`][The type of Value stored in the container. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a] `parameters_type`][R-tree parameters type. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91] `translator_type`][Value to Indexable Translator type. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d] `allocator_type`][The type of allocator used by the container. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6] `size_type`][Unsigned integral type used by the container. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1a6533b05d4a2eea9d4a0033e192add466] `indexable_type`][The Indexable type to which Value is translated. ]]
|
|
[[[#classboost_1_1geometry_1_1index_1_1rtree_1a653555282525601512c3b1bed1e9590f] `bounds_type`][The Box type used by the R-tree. ]]
|
|
]
|
|
|
|
[heading Constructor(s) and destructor]
|
|
[table
|
|
[[Function][Description]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1a393bb202f84b6fe5613df02d1ba2a092 `rtree()`]][The constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1a434839ea5dd2e57f9491d18520621c4b `rtree(parameters_type const &, translator_type const &, allocator_type)`]][The constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1ace0b58f496b7eb00c518b4fc2794f4bc `rtree(Iterator, Iterator)`]][The constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1a513f271626372c6dad5488f64db6d1d4 `rtree(Range const &)`]][The constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1ae8b10914ec434d1ee6877f5e1000b674 `~rtree()`]][The destructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1a006904b4e7dcef1fd1efcb70a010964f `rtree(rtree const &)`]][The copy constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1ac59521aa9a9b69104fa25c0f7b705354 `rtree(rtree const &, allocator_type const &)`]][The copy constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1a050fca8af38fe25548d4c22830b55bf2 `rtree(rtree &&)`]][The moving constructor. ]]
|
|
[[[link classboost_1_1geometry_1_1index_1_1rtree_1ae0b4e031554daa6e6e8d3a0f95630260 `rtree(rtree &&, allocator_type const &)`]][The moving constructor. ]]
|
|
]
|
|
|
|
[heading Member(s)]
|
|
[table
|
|
[[Modifier][Function][Description]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ab823a214501cb0f9fd00ba12a1ade179 `operator=(const rtree &)`]][The assignment operator. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a44bd4edee49db92c18b6bbbba77b42be `operator=(rtree &&)`]][The moving assignment. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1aad0285d25f96341a8dd6cc22feb3bd73 `swap(rtree &)`]][Swaps contents of two rtrees. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c `insert(value_type const &)`]][Insert a value to the index. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d `insert(Iterator, Iterator)`]][Insert a range of values to the index. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2 `insert(Range const &)`]][Insert a range of values to the index. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a `remove(value_type const &)`]][Remove a value from the container. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c `remove(Range const &)`]][Remove a range of values from the container. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949 `query(Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd `size()`]][Returns the number of stored values. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c `empty()`]][Query if the container is empty. ]]
|
|
[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09 `clear()`]][Removes all values stored in the container. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1aeba4f1afee40262204dd074a93536ebf `bounds()`]][Returns the box able to contain all values stored in the container. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a17fce1fac81f6460d2c3a5744f4963ee `count(ValueOrIndexable const &)`]][Count Values or Indexables stored in the container. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a18910715f67608ff010556ac41f51606 `parameters()`]][Returns parameters. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1afc7e9a4bd53a58552c17c1e7cb997258 `translator()`]][Returns the translator object. ]]
|
|
[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a1eeb303253f4cabe3a89a82ed41247ff `get_allocator()`]][Returns allocator used by the rtree. ]]
|
|
]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a393bb202f84b6fe5613df02d1ba2a092]
|
|
[section rtree()]
|
|
The constructor.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]`()``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]`()``)`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``explicit ``[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &`][ `translator` ][The translator object.]]
|
|
]
|
|
[heading Throws]
|
|
If allocator default constructor throws.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a434839ea5dd2e57f9491d18520621c4b]
|
|
[section rtree(parameters_type const &, translator_type const &, allocator_type)]
|
|
The constructor.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `allocator``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &`][ `translator` ][The translator object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]][ `allocator` ][The allocator object.]]
|
|
]
|
|
[heading Throws]
|
|
If allocator copy constructor throws.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ace0b58f496b7eb00c518b4fc2794f4bc]
|
|
[section rtree(Iterator, Iterator)]
|
|
The constructor.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
`template<``typename Iterator``>`
|
|
`rtree``(``Iterator` `first``,`
|
|
`Iterator` `last``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]`()``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]`()``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]`()``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Iterator`][ `first` ][The beginning of the range of Values. ]]
|
|
[[`Iterator`][ `last` ][The end of the range of Values. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &`][ `translator` ][The translator object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]][ `allocator` ][The allocator object.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If allocator copy constructor throws.
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When memory allocation for Node fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a513f271626372c6dad5488f64db6d1d4]
|
|
[section rtree(Range const &)]
|
|
The constructor.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
`template<``typename Range``>`
|
|
`rtree``(``Range const &` `rng``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]`()``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]`()``,`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]`()``)`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``explicit ``[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Range const &`][ `rng` ][The range of Values. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &`][ `translator` ][The translator object. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]][ `allocator` ][The allocator object.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If allocator copy constructor throws.
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When memory allocation for Node fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ae8b10914ec434d1ee6877f5e1000b674]
|
|
[section ~rtree()]
|
|
The destructor.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`~rtree``()`
|
|
]
|
|
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a006904b4e7dcef1fd1efcb70a010964f]
|
|
[section rtree(rtree const &)]
|
|
The copy constructor.
|
|
|
|
[heading Description]
|
|
It uses parameters, translator and allocator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If allocator copy constructor throws.
|
|
* If Value copy constructor throws.
|
|
* If allocation throws.
|
|
* When memory allocation for Node fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ac59521aa9a9b69104fa25c0f7b705354]
|
|
[section rtree(rtree const &, allocator_type const &)]
|
|
The copy constructor.
|
|
|
|
[heading Description]
|
|
It uses Parameters and translator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]` const &` `allocator``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]` const &`][ `allocator` ][The allocator which will be used.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If allocator copy constructor throws.
|
|
* If Value copy constructor throws.
|
|
* If allocation throws.
|
|
* When memory allocation for Node fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a050fca8af38fe25548d4c22830b55bf2]
|
|
[section rtree(rtree &&)]
|
|
The moving constructor.
|
|
|
|
[heading Description]
|
|
It uses parameters, translator and allocator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]]
|
|
]
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ae0b4e031554daa6e6e8d3a0f95630260]
|
|
[section rtree(rtree &&, allocator_type const &)]
|
|
The moving constructor.
|
|
|
|
[heading Description]
|
|
It uses parameters and translator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]` const &` `allocator``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved. ]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]]` const &`][ `allocator` ][The allocator.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If allocator copy constructor throws.
|
|
* If Value copy constructor throws (only if allocators aren't equal).
|
|
* If allocation throws (only if allocators aren't equal).
|
|
* When memory allocation for Node fails (only if allocators aren't equal).
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ab823a214501cb0f9fd00ba12a1ade179]
|
|
[section operator=(const rtree &)]
|
|
The assignment operator.
|
|
|
|
[heading Description]
|
|
It uses parameters and translator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(``const `[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `src``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`const `[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &`][ `src` ][The rtree which content will be copied.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a44bd4edee49db92c18b6bbbba77b42be]
|
|
[section operator=(rtree &&)]
|
|
The moving assignment.
|
|
|
|
[heading Description]
|
|
It uses parameters and translator from the source tree.[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]]
|
|
]
|
|
[heading Throws]
|
|
Only if allocators aren't equal.
|
|
|
|
* If Value copy constructor throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1aad0285d25f96341a8dd6cc22feb3bd73]
|
|
[section swap(rtree &)]
|
|
Swaps contents of two rtrees.
|
|
|
|
[heading Description]
|
|
Parameters, translator and allocators are swapped as well.[heading Synopsis]
|
|
[pre
|
|
|
|
`void` `swap``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `other``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &`][ `other` ][The rtree which content will be swapped with this rtree content.]]
|
|
]
|
|
[heading Throws]
|
|
If allocators swap throws.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c]
|
|
[section insert(value_type const &)]
|
|
Insert a value to the index.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`void` `insert``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` const &` `value``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` const &`][ `value` ][The value which will be stored in the container.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d]
|
|
[section insert(Iterator, Iterator)]
|
|
Insert a range of values to the index.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
`template<``typename Iterator``>`
|
|
`void` `insert``(``Iterator` `first``,` `Iterator` `last``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Iterator`][ `first` ][The beginning of the range of values. ]]
|
|
[[`Iterator`][ `last` ][The end of the range of values.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2]
|
|
[section insert(Range const &)]
|
|
Insert a range of values to the index.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
`template<``typename Range``>`
|
|
`void` `insert``(``Range const &` `rng``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Range const &`][ `rng` ][The range of values.]]
|
|
]
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a]
|
|
[section remove(value_type const &)]
|
|
Remove a value from the container.
|
|
|
|
[heading Description]
|
|
In contrast to the [^`std::set`] or [^`std::map erase()`] method this method removes only one value from the container.[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `remove``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` const &` `value``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` const &`][ `value` ][The value which will be removed from the container.]]
|
|
]
|
|
[heading Returns]
|
|
1 if the value was removed, 0 otherwise.
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd]
|
|
[section remove(Iterator, Iterator)]
|
|
Remove a range of values from the container.
|
|
|
|
[heading Description]
|
|
In contrast to the [^`std::set`] or [^`std::map erase()`] method it doesn't take iterators pointing to values stored in this container. It removes values equal to these passed as a range. Furthermore this method removes only one value for each one passed in the range, not all equal values.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Iterator``>`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `remove``(``Iterator` `first``,` `Iterator` `last``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Iterator`][ `first` ][The beginning of the range of values. ]]
|
|
[[`Iterator`][ `last` ][The end of the range of values.]]
|
|
]
|
|
[heading Returns]
|
|
The number of removed values.
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c]
|
|
[section remove(Range const &)]
|
|
Remove a range of values from the container.
|
|
|
|
[heading Description]
|
|
In contrast to the [^`std::set`] or [^`std::map erase()`] method it removes values equal to these passed as a range. Furthermore, this method removes only one value for each one passed in the range, not all equal values.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Range``>`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `remove``(``Range const &` `rng``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Range const &`][ `rng` ][The range of values.]]
|
|
]
|
|
[heading Returns]
|
|
The number of removed values.
|
|
[heading Throws]
|
|
|
|
|
|
* If Value copy constructor or copy assignment throws.
|
|
* If allocation throws.
|
|
* When nodes allocation fails.
|
|
|
|
|
|
|
|
[warning This operation is not thread safe. If it throws, the R-tree may be left in an inconsistent state, elements must not be inserted or removed, methods may return invalid data. ]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949]
|
|
[section query(Predicates const &, OutIter)]
|
|
Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
|
|
|
|
[heading Description]
|
|
This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates. Values will be returned only if all predicates are met.
|
|
|
|
[*Spatial predicates]
|
|
|
|
Spatial predicates may be generated by one of the functions listed below:
|
|
|
|
* [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
|
|
* [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
|
|
* [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
|
|
* [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
|
|
* [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]],
|
|
|
|
|
|
It is possible to negate spatial predicates:
|
|
|
|
* [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
|
|
* [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
|
|
* [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
|
|
* [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
|
|
* [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]]
|
|
|
|
[*Satisfies predicate]
|
|
|
|
This is a special kind of predicate which allows to pass a user-defined function or function object which checks if Value should be returned by the query. It's generated by:
|
|
|
|
* [^[link group__predicates_1gae7e9291c5b99041fb155d29de0860bab boost::geometry::index::satisfies()]].
|
|
|
|
[*Nearest predicate]
|
|
|
|
If the nearest predicate is passed a k-nearest neighbor search will be performed. This query will result in returning k values to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by:
|
|
|
|
* [^[link group__predicates_1gae80a2c204673a8b11c4fc137cfff6556 boost::geometry::index::nearest()]].
|
|
|
|
[*Connecting predicates]
|
|
|
|
Predicates may be passed together connected with [^`operator&&()`].[heading Synopsis]
|
|
[pre
|
|
`template<``typename Predicates``,` `typename OutIter``>`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `query``(``Predicates const &` `predicates``,` `OutIter` `out_it``)`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Predicates const &`][ `predicates` ][Predicates. ]]
|
|
[[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]]
|
|
]
|
|
[heading Returns]
|
|
The number of values found.
|
|
[heading Example]
|
|
|
|
``
|
|
// return elements intersecting box
|
|
tree.query(bgi::intersects(box), std::back_inserter(result));
|
|
// return elements intersecting poly but not within box
|
|
tree.query(bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
|
|
// return elements overlapping box and meeting my_fun unary predicate
|
|
tree.query(bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result));
|
|
// return 5 elements nearest to pt and elements are intersecting box
|
|
tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
|
|
// return 5 elements which centroids are nearest to pt and elements aren't within box
|
|
tree.query(bgi::nearest(bgi::to_centroid(pt), 5) && !bgi::within(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[heading Throws]
|
|
If Value copy constructor or copy assignment throws.
|
|
|
|
[warning Only one [^[link group__predicates_1gae80a2c204673a8b11c4fc137cfff6556 nearest()]] perdicate may be passed to the query.]
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd]
|
|
[section size()]
|
|
Returns the number of stored values.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `size``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
The number of stored values.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ae889567443b0ba0dbdb975564c55804c]
|
|
[section empty()]
|
|
Query if the container is empty.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`bool` `empty``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
true if the container is empty.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1ae6027e42d28a4bf93e74b055c79e6b09]
|
|
[section clear()]
|
|
Removes all values stored in the container.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
`void` `clear``()`
|
|
]
|
|
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1aeba4f1afee40262204dd074a93536ebf]
|
|
[section bounds()]
|
|
Returns the box able to contain all values stored in the container.
|
|
|
|
[heading Description]
|
|
Returns the box able to contain all values stored in the container. If the container is empty the result of [^`geometry::assign_inverse()`] is returned.[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a653555282525601512c3b1bed1e9590f bounds_type]] `bounds``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
The box able to contain all values stored in the container or an invalid box if there are no values in the container.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a17fce1fac81f6460d2c3a5744f4963ee]
|
|
[section count(ValueOrIndexable const &)]
|
|
Count Values or Indexables stored in the container.
|
|
|
|
[heading Description]
|
|
For indexable_type it returns the number of values which indexables equals the parameter. For value_type it returns the number of values which equals the parameter.[heading Synopsis]
|
|
[pre
|
|
`template<``typename ValueOrIndexable``>`
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `count``(``ValueOrIndexable const &` `vori``)`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`ValueOrIndexable const &`][ `vori` ][The value or indexable which will be counted.]]
|
|
]
|
|
[heading Returns]
|
|
The number of values found.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a18910715f67608ff010556ac41f51606]
|
|
[section parameters()]
|
|
Returns parameters.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1af85d4e399a807b3e4e46d38a0b4ffc5a parameters_type]]` const &` `parameters``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
The parameters object.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1afc7e9a4bd53a58552c17c1e7cb997258]
|
|
[section translator()]
|
|
Returns the translator object.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1adbc30a1fa986e2e856e0662111ac2d91 translator_type]]` const &` `translator``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
The translator object.
|
|
[heading Throws]
|
|
Nothing.
|
|
|
|
[endsect]
|
|
|
|
[#classboost_1_1geometry_1_1index_1_1rtree_1a1eeb303253f4cabe3a89a82ed41247ff]
|
|
[section get_allocator()]
|
|
Returns allocator used by the rtree.
|
|
|
|
[heading Synopsis]
|
|
[pre
|
|
|
|
[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9d35bc38fa697c6f600548fb5b38807d allocator_type]] `get_allocator``()`
|
|
]
|
|
|
|
[heading Modifier(s)]
|
|
``const ``[heading Returns]
|
|
The allocator.
|
|
[heading Throws]
|
|
If allocator copy constructor throws.
|
|
|
|
[endsect]
|
|
|
|
[endsect]
|
|
|