1[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically] 2[/ Generated from xml/classboost_1_1geometry_1_1index_1_1rtree.xml] 3[#classboost_1_1geometry_1_1index_1_1rtree] 4[section boost::geometry::index::rtree] 5 6'''<indexterm><primary>boost</primary></indexterm><indexterm><primary>geometry</primary></indexterm><indexterm><primary>index</primary></indexterm><indexterm><primary>rtree</primary></indexterm>''' 7The R-tree spatial index. 8 9[heading Description] 10This is self-balancing spatial index capable to store various types of Values and balancing algorithms. 11 12[heading Parameters] 13The 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. 14 15 16 17 18Predefined algorithms with compile-time parameters are: 19 20* [^[link structboost_1_1geometry_1_1index_1_1linear boost::geometry::index::linear]], 21* [^[link structboost_1_1geometry_1_1index_1_1quadratic boost::geometry::index::quadratic]], 22* [^[link structboost_1_1geometry_1_1index_1_1rstar boost::geometry::index::rstar]]. 23 24 25 26 27 28 29Predefined algorithms with run-time parameters are: 30 31* [^[link classboost_1_1geometry_1_1index_1_1dynamic__linear boost::geometry::index::dynamic_linear]], 32* [^[link classboost_1_1geometry_1_1index_1_1dynamic__quadratic boost::geometry::index::dynamic_quadratic]], 33* [^[link classboost_1_1geometry_1_1index_1_1dynamic__rstar boost::geometry::index::dynamic_rstar]]. 34 35 36 37[heading IndexableGetter] 38The object of IndexableGetter type translates from Value to Indexable each time r-tree requires it. This means that this operation is done for each Value access. Therefore the IndexableGetter should return the Indexable by a reference type. The Indexable should not be calculated since it could harm the performance. The default IndexableGetter can translate all types adapted to Point, Box or Segment concepts (called Indexables). Furthermore, it can handle [^`std::pair<Indexable, T>`], [^`boost::tuple<Indexable, ...>`] and [^`std::tuple<Indexable, ...>`] when possible. For example, for Value of type [^`std::pair<Box, int>`], the default IndexableGetter translates from [^`std::pair<Box, int> const&`] to [^`Box const&`]. 39 40[heading EqualTo] 41The object of EqualTo type compares Values and returns [^`true`] if they are equal. It's similar to [^`std::equal_to<>`]. The default EqualTo returns the result of [^`boost::geometry::equals()`] for types adapted to some Geometry concept defined in Boost.Geometry and the result of [^`operator==`] for other types. Components of Pairs and Tuples are compared left-to-right. 42 43[heading Header] 44`#include <boost/geometry/index/rtree.hpp>` 45 46[heading Synopsis] 47[pre 48`template<``typename Value``,` 49 `typename Parameters``,` 50 `typename IndexableGetter` = [^[link structboost_1_1geometry_1_1index_1_1indexable index::indexable]]`<Value>``,` 51 `typename EqualTo` = [^[link structboost_1_1geometry_1_1index_1_1equal__to index::equal_to]]`<Value>``,` 52 `typename Allocator` = `boost::container::new_allocator<Value>``>` 53`class rtree` 54`{` 55` // ...` 56`};` 57] 58 59[heading Template parameter(s)] 60[table 61[[Parameter] [Description]] 62[[`Value`][The type of objects stored in the container. ]] 63[[`Parameters`][Compile-time parameters. ]] 64[[`IndexableGetter`][The function object extracting Indexable from Value. ]] 65[[`EqualTo`][The function object comparing objects of type Value. ]] 66[[`Allocator`][The allocator used to allocate/deallocate memory, construct/destroy nodes and Values. ]] 67] 68 69[heading Typedef(s)] 70[table 71[[Type] [Description]] 72[[[#classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757] `value_type`][The type of Value stored in the container. ]] 73[[[#classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17] `parameters_type`][R-tree parameters type. ]] 74[[[#classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5] `indexable_getter`][The function object extracting Indexable from Value. ]] 75[[[#classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b] `value_equal`][The function object comparing objects of type Value. ]] 76[[[#classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e] `allocator_type`][The type of allocator used by the container. ]] 77[[[#classboost_1_1geometry_1_1index_1_1rtree_1a28e88e55d260a454688fe1bd5e5af96b] `indexable_type`][The Indexable type to which Value is translated. ]] 78[[[#classboost_1_1geometry_1_1index_1_1rtree_1a12e80f9da4c68e0e687f1c2012321147] `bounds_type`][The Box type used by the R-tree. ]] 79[[[#classboost_1_1geometry_1_1index_1_1rtree_1a5301c3d7ee3589751579e0573a9e8165] `reference`][Type of reference to Value. ]] 80[[[#classboost_1_1geometry_1_1index_1_1rtree_1a615e622930be97ab1f3b8ceee641feaf] `const_reference`][Type of reference to const Value. ]] 81[[[#classboost_1_1geometry_1_1index_1_1rtree_1a762ced6b98d2cc6503e2b00549c6a89a] `pointer`][Type of pointer to Value. ]] 82[[[#classboost_1_1geometry_1_1index_1_1rtree_1abad30462044d5d8fb607c24a05e8c9c2] `const_pointer`][Type of pointer to const Value. ]] 83[[[#classboost_1_1geometry_1_1index_1_1rtree_1ac256168e9371a070515fc61f29c691ed] `difference_type`][Type of difference type. ]] 84[[[#classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5] `size_type`][Unsigned integral type used by the container. ]] 85[[[#classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde] `const_iterator`][Type of const iterator, category ForwardIterator. ]] 86[[[#classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855] `const_query_iterator`][Type of const query iterator, category ForwardIterator. ]] 87] 88 89[heading Constructor(s) and destructor] 90[table 91[[Function][Description]] 92[[[link classboost_1_1geometry_1_1index_1_1rtree_1a55d5fd5d205df08db5267253689ccf0c `rtree()`]][The constructor. ]] 93[[[link classboost_1_1geometry_1_1index_1_1rtree_1a1a6b696d4855cbf1866196fe058c3a87 `rtree(parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &)`]][The constructor. ]] 94[[[link classboost_1_1geometry_1_1index_1_1rtree_1a037f17d8a1dfa4a818ff471dec61c912 `rtree(Iterator, Iterator)`]][The constructor. ]] 95[[[link classboost_1_1geometry_1_1index_1_1rtree_1a7b96b715c52ddc13d7a81db344825848 `rtree(Range const &)`]][The constructor. ]] 96[[[link classboost_1_1geometry_1_1index_1_1rtree_1aad1b32e82dd734747810f01ee17e464e `rtree(Iterator, Iterator, parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &, PackAlloc const &)`]][The constructor. ]] 97[[[link classboost_1_1geometry_1_1index_1_1rtree_1aa2615aff643804935c530a668663807f `rtree(Range const &, parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &, PackAlloc const &)`]][The constructor. ]] 98[[[link classboost_1_1geometry_1_1index_1_1rtree_1a0d5b2e4876782e6950fbbdfa60f7406b `rtree(Iterator, Iterator, allocator_type const &)`]][The constructor. ]] 99[[[link classboost_1_1geometry_1_1index_1_1rtree_1a90857cba52523d5ff0e7b2a87081ccf5 `rtree(Range const &, allocator_type const &)`]][The constructor. ]] 100[[[link classboost_1_1geometry_1_1index_1_1rtree_1aed5c247a23b8236b2e80867acefe55ec `rtree(Iterator, Iterator, allocator_type const &, PackAlloc const &)`]][The constructor. ]] 101[[[link classboost_1_1geometry_1_1index_1_1rtree_1aceb504e98a611ef81f96b2df357d03f3 `rtree(Range const &, allocator_type const &, PackAlloc const &)`]][The constructor. ]] 102[[[link classboost_1_1geometry_1_1index_1_1rtree_1af8db72811d2be53c409240204e63fb5a `~rtree()`]][The destructor. ]] 103[[[link classboost_1_1geometry_1_1index_1_1rtree_1a826fc3236e181ad718d5283e95d7866f `rtree(rtree const &)`]][The copy constructor. ]] 104[[[link classboost_1_1geometry_1_1index_1_1rtree_1a72b6b75e083eea2ed26f54d4a2265375 `rtree(rtree const &, allocator_type const &)`]][The copy constructor. ]] 105[[[link classboost_1_1geometry_1_1index_1_1rtree_1aa8b27db8cb783282ab5274e6769da26a `rtree(rtree &&)`]][The moving constructor. ]] 106[[[link classboost_1_1geometry_1_1index_1_1rtree_1a8508c4236d17ff39a1caef058aac8486 `rtree(rtree &&, allocator_type const &)`]][The moving constructor. ]] 107] 108 109[heading Member(s)] 110[table 111[[Modifier][Function][Description]] 112[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ad0db5e9e41e1553f944b7e740dbbb883 `operator=(rtree const &)`]][The assignment operator. ]] 113[[][[link classboost_1_1geometry_1_1index_1_1rtree_1af0bf9622ed3e901580b73ed39b746fb7 `operator=(rtree &&)`]][The moving assignment. ]] 114[[][[link classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b `swap(rtree &)`]][Swaps contents of two rtrees. ]] 115[[][[link classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86 `insert(value_type const &)`]][Insert a value to the index. ]] 116[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d `insert(Iterator, Iterator)`]][Insert a range of values to the index. ]] 117[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5db294b14ebf1319edcfc92e78c8167e `insert(ConvertibleOrRange const &)`]][Insert a value created using convertible object or a range of values to the index. ]] 118[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4 `remove(value_type const &)`]][Remove a value from the container. ]] 119[[][[link classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]] 120[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a320cd1861ba7b43364ed53e1f93a4411 `remove(ConvertibleOrRange const &)`]][Remove value corresponding to an object convertible to it or a range of values from the container. ]] 121[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ace0ba7f3280b1074cea31b4f1bc1d7ea `query(Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]] 122[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a874f43d4119f552a613f051c6177b9d8 `qbegin(Predicates const &)`]][Returns a query iterator pointing at the begin of the query range. ]] 123[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4950060dcd8647acbddfbeb38d453253 `qend()`]][Returns a query iterator pointing at the end of the query range. ]] 124[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31 `begin()`]][Returns the iterator pointing at the begin of the rtree values range. ]] 125[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a5c8b735055ac44dd1d354359c5a0b910 `end()`]][Returns the iterator pointing at the end of the rtree values range. ]] 126[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a7a7bfa3ce751e0c357c36e1bb238c523 `size()`]][Returns the number of stored values. ]] 127[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a18bed92ff302df192215c3809fe5272e `empty()`]][Query if the container is empty. ]] 128[[][[link classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c `clear()`]][Removes all values stored in the container. ]] 129[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a2f244b24b24711dc39019198151dc2db `bounds()`]][Returns the box able to contain all values stored in the container. ]] 130[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a69dfe7fea7dac9513b79b9918bbf8050 `count(ValueOrIndexable const &)`]][Count Values or Indexables stored in the container. ]] 131[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4968c4543d315372b4c24fc4b571c3c5 `parameters()`]][Returns parameters. ]] 132[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1abf1759583c5ae7284dbe53e904eec455 `indexable_get()`]][Returns function retrieving Indexable from Value. ]] 133[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ae7d1516455b9565fbddff04db202b223 `value_eq()`]][Returns function comparing Values. ]] 134[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a256cfca98dba150a63fd2023934dbd1a `get_allocator()`]][Returns allocator used by the rtree. ]] 135] 136 137[#classboost_1_1geometry_1_1index_1_1rtree_1a55d5fd5d205df08db5267253689ccf0c] 138[section rtree()] 139'''<indexterm><primary>rtree</primary></indexterm>''' 140The constructor. 141 142[heading Synopsis] 143[pre 144 145`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]`()``,` 146 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,` 147 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``)` 148] 149 150[heading Modifier(s)] 151``explicit ``[heading Parameter(s)] 152[table 153[[Type][Name][Description]] 154[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 155[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 156[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values.]] 157] 158[heading Throws] 159If allocator default constructor throws. 160 161[endsect] 162 163[#classboost_1_1geometry_1_1index_1_1rtree_1a1a6b696d4855cbf1866196fe058c3a87] 164[section:rtree_par_cr_ind_cr_val_cr_all_cr rtree(parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &)] 165'''<indexterm><primary>rtree</primary></indexterm>''' 166The constructor. 167 168[heading Synopsis] 169[pre 170 171`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters``,` 172 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter``,` 173 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal``,` 174 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)` 175] 176 177[heading Parameter(s)] 178[table 179[[Type][Name][Description]] 180[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 181[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 182[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]] 183[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]] 184] 185[heading Throws] 186If allocator copy constructor throws. 187 188[endsect] 189 190[#classboost_1_1geometry_1_1index_1_1rtree_1a037f17d8a1dfa4a818ff471dec61c912] 191[section rtree(Iterator, Iterator)] 192'''<indexterm><primary>rtree</primary></indexterm>''' 193The constructor. 194 195[heading Description] 196The tree is created using packing algorithm.[heading Synopsis] 197[pre 198`template<``typename Iterator``>` 199`rtree``(``Iterator` `first``,` 200 `Iterator` `last``,` 201 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]`()``,` 202 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,` 203 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``,` 204 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]`()``)` 205] 206 207[heading Parameter(s)] 208[table 209[[Type][Name][Description]] 210[[`Iterator`][ `first` ][The beginning of the range of Values. ]] 211[[`Iterator`][ `last` ][The end of the range of Values. ]] 212[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 213[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 214[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]] 215[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]] 216] 217[heading Throws] 218 219 220* If allocator copy constructor throws. 221* If Value copy constructor or copy assignment throws. 222* If allocation throws or returns invalid value. 223 224 225 226[endsect] 227 228[#classboost_1_1geometry_1_1index_1_1rtree_1a7b96b715c52ddc13d7a81db344825848] 229[section rtree(Range const &)] 230'''<indexterm><primary>rtree</primary></indexterm>''' 231The constructor. 232 233[heading Description] 234The tree is created using packing algorithm.[heading Synopsis] 235[pre 236`template<``typename Range``>` 237`rtree``(``Range const &` `rng``,` 238 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]`()``,` 239 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,` 240 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``,` 241 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]`()``)` 242] 243 244[heading Modifier(s)] 245``explicit ``[heading Parameter(s)] 246[table 247[[Type][Name][Description]] 248[[`Range const &`][ `rng` ][The range of Values. ]] 249[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 250[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 251[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]] 252[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]] 253] 254[heading Throws] 255 256 257* If allocator copy constructor throws. 258* If Value copy constructor or copy assignment throws. 259* If allocation throws or returns invalid value. 260 261 262 263[endsect] 264 265[#classboost_1_1geometry_1_1index_1_1rtree_1aad1b32e82dd734747810f01ee17e464e] 266[section:rtree_ite_ite_par_cr_ind_cr_val_cr_all_cr_pac_cr rtree(Iterator, Iterator, parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &, PackAlloc const &)] 267'''<indexterm><primary>rtree</primary></indexterm>''' 268The constructor. 269 270[heading Description] 271The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 272[pre 273`template<``typename Iterator``,` `typename PackAlloc``>` 274`rtree``(``Iterator` `first``,` 275 `Iterator` `last``,` 276 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters``,` 277 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter``,` 278 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal``,` 279 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``,` 280 `PackAlloc const &` `temp_allocator``)` 281] 282 283[heading Parameter(s)] 284[table 285[[Type][Name][Description]] 286[[`Iterator`][ `first` ][The beginning of the range of Values. ]] 287[[`Iterator`][ `last` ][The end of the range of Values. ]] 288[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 289[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 290[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]] 291[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree. ]] 292[[`PackAlloc const &`][ `temp_allocator` ][The temporary allocator object used when packing.]] 293] 294[heading Throws] 295 296 297* If allocator copy constructor throws. 298* If Value copy constructor or copy assignment throws. 299* If allocation throws or returns invalid value. 300 301 302 303[endsect] 304 305[#classboost_1_1geometry_1_1index_1_1rtree_1aa2615aff643804935c530a668663807f] 306[section:rtree_ran_cr_par_cr_ind_cr_val_cr_all_cr_pac_cr rtree(Range const &, parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &, PackAlloc const &)] 307'''<indexterm><primary>rtree</primary></indexterm>''' 308The constructor. 309 310[heading Description] 311The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 312[pre 313`template<``typename Range``,` `typename PackAlloc``>` 314`rtree``(``Range const &` `rng``,` 315 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters``,` 316 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter``,` 317 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal``,` 318 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``,` 319 `PackAlloc const &` `temp_allocator``)` 320] 321 322[heading Modifier(s)] 323``explicit ``[heading Parameter(s)] 324[table 325[[Type][Name][Description]] 326[[`Range const &`][ `rng` ][The range of Values. ]] 327[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]] 328[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]] 329[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]] 330[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree. ]] 331[[`PackAlloc const &`][ `temp_allocator` ][The temporary allocator object used when packing.]] 332] 333[heading Throws] 334 335 336* If allocator copy constructor throws. 337* If Value copy constructor or copy assignment throws. 338* If allocation throws or returns invalid value. 339 340 341 342[endsect] 343 344[#classboost_1_1geometry_1_1index_1_1rtree_1a0d5b2e4876782e6950fbbdfa60f7406b] 345[section rtree(Iterator, Iterator, allocator_type const &)] 346'''<indexterm><primary>rtree</primary></indexterm>''' 347The constructor. 348 349[heading Description] 350The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 351[pre 352`template<``typename Iterator``>` 353`rtree``(``Iterator` `first``,` 354 `Iterator` `last``,` 355 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)` 356] 357 358[heading Parameter(s)] 359[table 360[[Type][Name][Description]] 361[[`Iterator`][ `first` ][The beginning of the range of Values. ]] 362[[`Iterator`][ `last` ][The end of the range of Values. ]] 363[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree.]] 364] 365[heading Throws] 366 367 368* If allocator copy constructor throws. 369* If Value copy constructor or copy assignment throws. 370* If allocation throws or returns invalid value. 371 372 373 374[endsect] 375 376[#classboost_1_1geometry_1_1index_1_1rtree_1a90857cba52523d5ff0e7b2a87081ccf5] 377[section rtree(Range const &, allocator_type const &)] 378'''<indexterm><primary>rtree</primary></indexterm>''' 379The constructor. 380 381[heading Description] 382The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 383[pre 384`template<``typename Range``>` 385`rtree``(``Range const &` `rng``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)` 386] 387 388[heading Modifier(s)] 389``explicit ``[heading Parameter(s)] 390[table 391[[Type][Name][Description]] 392[[`Range const &`][ `rng` ][The range of Values. ]] 393[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree.]] 394] 395[heading Throws] 396 397 398* If allocator copy constructor throws. 399* If Value copy constructor or copy assignment throws. 400* If allocation throws or returns invalid value. 401 402 403 404[endsect] 405 406[#classboost_1_1geometry_1_1index_1_1rtree_1aed5c247a23b8236b2e80867acefe55ec] 407[section:rtree_ite_ite_all_cr_pac_cr rtree(Iterator, Iterator, allocator_type const &, PackAlloc const &)] 408'''<indexterm><primary>rtree</primary></indexterm>''' 409The constructor. 410 411[heading Description] 412The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 413[pre 414`template<``typename Iterator``,` `typename PackAlloc``>` 415`rtree``(``Iterator` `first``,` 416 `Iterator` `last``,` 417 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``,` 418 `PackAlloc const &` `temp_allocator``)` 419] 420 421[heading Parameter(s)] 422[table 423[[Type][Name][Description]] 424[[`Iterator`][ `first` ][The beginning of the range of Values. ]] 425[[`Iterator`][ `last` ][The end of the range of Values. ]] 426[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree. ]] 427[[`PackAlloc const &`][ `temp_allocator` ][The temporary allocator object used when packing.]] 428] 429[heading Throws] 430 431 432* If allocator copy constructor throws. 433* If Value copy constructor or copy assignment throws. 434* If allocation throws or returns invalid value. 435 436 437 438[endsect] 439 440[#classboost_1_1geometry_1_1index_1_1rtree_1aceb504e98a611ef81f96b2df357d03f3] 441[section:rtree_ran_cr_all_cr_pac_cr rtree(Range const &, allocator_type const &, PackAlloc const &)] 442'''<indexterm><primary>rtree</primary></indexterm>''' 443The constructor. 444 445[heading Description] 446The tree is created using packing algorithm and a temporary packing allocator.[heading Synopsis] 447[pre 448`template<``typename Range``,` `typename PackAlloc``>` 449`rtree``(``Range const &` `rng``,` 450 [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``,` 451 `PackAlloc const &` `temp_allocator``)` 452] 453 454[heading Modifier(s)] 455``explicit ``[heading Parameter(s)] 456[table 457[[Type][Name][Description]] 458[[`Range const &`][ `rng` ][The range of Values. ]] 459[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object for persistent data in the tree. ]] 460[[`PackAlloc const &`][ `temp_allocator` ][The temporary allocator object used when packing.]] 461] 462[heading Throws] 463 464 465* If allocator copy constructor throws. 466* If Value copy constructor or copy assignment throws. 467* If allocation throws or returns invalid value. 468 469 470 471[endsect] 472 473[#classboost_1_1geometry_1_1index_1_1rtree_1af8db72811d2be53c409240204e63fb5a] 474[section ~rtree()] 475'''<indexterm><primary>~rtree</primary></indexterm>''' 476The destructor. 477 478[heading Synopsis] 479[pre 480 481`~rtree``()` 482] 483 484[heading Throws] 485Nothing. 486 487[endsect] 488 489[#classboost_1_1geometry_1_1index_1_1rtree_1a826fc3236e181ad718d5283e95d7866f] 490[section rtree(rtree const &)] 491'''<indexterm><primary>rtree</primary></indexterm>''' 492The copy constructor. 493 494[heading Description] 495It uses parameters, translator and allocator from the source tree.[heading Synopsis] 496[pre 497 498`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``)` 499] 500 501[heading Parameter(s)] 502[table 503[[Type][Name][Description]] 504[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied.]] 505] 506[heading Throws] 507 508 509* If allocator copy constructor throws. 510* If Value copy constructor throws. 511* If allocation throws or returns invalid value. 512 513 514 515[endsect] 516 517[#classboost_1_1geometry_1_1index_1_1rtree_1a72b6b75e083eea2ed26f54d4a2265375] 518[section rtree(rtree const &, allocator_type const &)] 519'''<indexterm><primary>rtree</primary></indexterm>''' 520The copy constructor. 521 522[heading Description] 523It uses Parameters and translator from the source tree.[heading Synopsis] 524[pre 525 526`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)` 527] 528 529[heading Parameter(s)] 530[table 531[[Type][Name][Description]] 532[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied. ]] 533[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator which will be used.]] 534] 535[heading Throws] 536 537 538* If allocator copy constructor throws. 539* If Value copy constructor throws. 540* If allocation throws or returns invalid value. 541 542 543 544[endsect] 545 546[#classboost_1_1geometry_1_1index_1_1rtree_1aa8b27db8cb783282ab5274e6769da26a] 547[section rtree(rtree &&)] 548'''<indexterm><primary>rtree</primary></indexterm>''' 549The moving constructor. 550 551[heading Description] 552It uses parameters, translator and allocator from the source tree.[heading Synopsis] 553[pre 554 555`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)` 556] 557 558[heading Parameter(s)] 559[table 560[[Type][Name][Description]] 561[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]] 562] 563[heading Throws] 564Nothing. 565 566[endsect] 567 568[#classboost_1_1geometry_1_1index_1_1rtree_1a8508c4236d17ff39a1caef058aac8486] 569[section rtree(rtree &&, allocator_type const &)] 570'''<indexterm><primary>rtree</primary></indexterm>''' 571The moving constructor. 572 573[heading Description] 574It uses parameters and translator from the source tree.[heading Synopsis] 575[pre 576 577`rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)` 578] 579 580[heading Parameter(s)] 581[table 582[[Type][Name][Description]] 583[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved. ]] 584[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator.]] 585] 586[heading Throws] 587 588 589* If allocator copy constructor throws. 590* If Value copy constructor throws (only if allocators aren't equal). 591* If allocation throws or returns invalid value (only if allocators aren't equal). 592 593 594 595[endsect] 596 597[#classboost_1_1geometry_1_1index_1_1rtree_1ad0db5e9e41e1553f944b7e740dbbb883] 598[section operator=(rtree const &)] 599'''<indexterm><primary>operator=</primary></indexterm>''' 600The assignment operator. 601 602[heading Description] 603It uses parameters and translator from the source tree.[heading Synopsis] 604[pre 605 606[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``)` 607] 608 609[heading Parameter(s)] 610[table 611[[Type][Name][Description]] 612[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied.]] 613] 614[heading Throws] 615 616 617* If Value copy constructor throws. 618* If allocation throws. 619* If allocation throws or returns invalid value. 620 621 622 623[endsect] 624 625[#classboost_1_1geometry_1_1index_1_1rtree_1af0bf9622ed3e901580b73ed39b746fb7] 626[section operator=(rtree &&)] 627'''<indexterm><primary>operator=</primary></indexterm>''' 628The moving assignment. 629 630[heading Description] 631It uses parameters and translator from the source tree.[heading Synopsis] 632[pre 633 634[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)` 635] 636 637[heading Parameter(s)] 638[table 639[[Type][Name][Description]] 640[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]] 641] 642[heading Throws] 643Only if allocators aren't equal. 644 645* If Value copy constructor throws. 646* If allocation throws or returns invalid value. 647 648 649 650[endsect] 651 652[#classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b] 653[section swap(rtree &)] 654'''<indexterm><primary>swap</primary></indexterm>''' 655Swaps contents of two rtrees. 656 657[heading Description] 658Parameters, translator and allocators are swapped as well.[heading Synopsis] 659[pre 660 661`void` `swap``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `other``)` 662] 663 664[heading Parameter(s)] 665[table 666[[Type][Name][Description]] 667[[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &`][ `other` ][The rtree which content will be swapped with this rtree content.]] 668] 669[heading Throws] 670If allocators swap throws. 671 672[endsect] 673 674[#classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86] 675[section insert(value_type const &)] 676'''<indexterm><primary>insert</primary></indexterm>''' 677Insert a value to the index. 678 679[heading Synopsis] 680[pre 681 682`void` `insert``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &` `value``)` 683] 684 685[heading Parameter(s)] 686[table 687[[Type][Name][Description]] 688[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &`][ `value` ][The value which will be stored in the container.]] 689] 690[heading Throws] 691 692 693* If Value copy constructor or copy assignment throws. 694* If allocation throws or returns invalid value. 695 696 697 698[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 699 700[endsect] 701 702[#classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d] 703[section insert(Iterator, Iterator)] 704'''<indexterm><primary>insert</primary></indexterm>''' 705Insert a range of values to the index. 706 707[heading Synopsis] 708[pre 709`template<``typename Iterator``>` 710`void` `insert``(``Iterator` `first``,` `Iterator` `last``)` 711] 712 713[heading Parameter(s)] 714[table 715[[Type][Name][Description]] 716[[`Iterator`][ `first` ][The beginning of the range of values. ]] 717[[`Iterator`][ `last` ][The end of the range of values.]] 718] 719[heading Throws] 720 721 722* If Value copy constructor or copy assignment throws. 723* If allocation throws or returns invalid value. 724 725 726 727[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 728 729[endsect] 730 731[#classboost_1_1geometry_1_1index_1_1rtree_1a5db294b14ebf1319edcfc92e78c8167e] 732[section insert(ConvertibleOrRange const &)] 733'''<indexterm><primary>insert</primary></indexterm>''' 734Insert a value created using convertible object or a range of values to the index. 735 736[heading Synopsis] 737[pre 738`template<``typename ConvertibleOrRange``>` 739`void` `insert``(``ConvertibleOrRange const &` `conv_or_rng``)` 740] 741 742[heading Parameter(s)] 743[table 744[[Type][Name][Description]] 745[[`ConvertibleOrRange const &`][ `conv_or_rng` ][An object of type convertible to value_type or a range of values.]] 746] 747[heading Throws] 748 749 750* If Value copy constructor or copy assignment throws. 751* If allocation throws or returns invalid value. 752 753 754 755[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 756 757[endsect] 758 759[#classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4] 760[section remove(value_type const &)] 761'''<indexterm><primary>remove</primary></indexterm>''' 762Remove a value from the container. 763 764[heading Description] 765In contrast to the [^`std::set`] or [^`std::map erase()`] method this method removes only one value from the container.[heading Synopsis] 766[pre 767 768[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `remove``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &` `value``)` 769] 770 771[heading Parameter(s)] 772[table 773[[Type][Name][Description]] 774[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &`][ `value` ][The value which will be removed from the container.]] 775] 776[heading Returns] 7771 if the value was removed, 0 otherwise. 778[heading Throws] 779 780 781* If Value copy constructor or copy assignment throws. 782* If allocation throws or returns invalid value. 783 784 785 786[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 787 788[endsect] 789 790[#classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa] 791[section remove(Iterator, Iterator)] 792'''<indexterm><primary>remove</primary></indexterm>''' 793Remove a range of values from the container. 794 795[heading Description] 796In 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] 797[pre 798`template<``typename Iterator``>` 799[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `remove``(``Iterator` `first``,` `Iterator` `last``)` 800] 801 802[heading Parameter(s)] 803[table 804[[Type][Name][Description]] 805[[`Iterator`][ `first` ][The beginning of the range of values. ]] 806[[`Iterator`][ `last` ][The end of the range of values.]] 807] 808[heading Returns] 809The number of removed values. 810[heading Throws] 811 812 813* If Value copy constructor or copy assignment throws. 814* If allocation throws or returns invalid value. 815 816 817 818[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 819 820[endsect] 821 822[#classboost_1_1geometry_1_1index_1_1rtree_1a320cd1861ba7b43364ed53e1f93a4411] 823[section remove(ConvertibleOrRange const &)] 824'''<indexterm><primary>remove</primary></indexterm>''' 825Remove value corresponding to an object convertible to it or a range of values from the container. 826 827[heading Description] 828In 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] 829[pre 830`template<``typename ConvertibleOrRange``>` 831[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `remove``(``ConvertibleOrRange const &` `conv_or_rng``)` 832] 833 834[heading Parameter(s)] 835[table 836[[Type][Name][Description]] 837[[`ConvertibleOrRange const &`][ `conv_or_rng` ][The object of type convertible to value_type or a range of values.]] 838] 839[heading Returns] 840The number of removed values. 841[heading Throws] 842 843 844* If Value copy constructor or copy assignment throws. 845* If allocation throws or returns invalid value. 846 847 848 849[warning This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. ] 850 851[endsect] 852 853[#classboost_1_1geometry_1_1index_1_1rtree_1ace0ba7f3280b1074cea31b4f1bc1d7ea] 854[section query(Predicates const &, OutIter)] 855'''<indexterm><primary>query</primary></indexterm>''' 856Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. 857 858[heading Description] 859This 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. 860 861[*Spatial predicates] 862 863Spatial predicates may be generated by one of the functions listed below: 864 865* [^[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]], 866* [^[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]], 867* [^[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]], 868* [^[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]], 869* [^[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]], 870* [^[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]], 871* [^[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]], 872 873 874It is possible to negate spatial predicates: 875 876* [^`! `[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]], 877* [^`! `[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]], 878* [^`! `[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]], 879* [^`! `[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]], 880* [^`! `[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]], 881* [^`! `[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]], 882* [^`! `[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]] 883 884[*Satisfies predicate] 885 886This 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: 887 888* [^[link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c boost::geometry::index::satisfies()]]. 889 890[*Nearest predicate] 891 892If 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: 893 894* [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e boost::geometry::index::nearest()]]. 895 896[*Connecting predicates] 897 898Predicates may be passed together connected with [^`operator&&()`].[heading Synopsis] 899[pre 900`template<``typename Predicates``,` `typename OutIter``>` 901[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `query``(``Predicates const &` `predicates``,` `OutIter` `out_it``)` 902] 903 904[heading Modifier(s)] 905``const ``[heading Parameter(s)] 906[table 907[[Type][Name][Description]] 908[[`Predicates const &`][ `predicates` ][Predicates. ]] 909[[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]] 910] 911[heading Returns] 912The number of values found. 913[heading Example] 914 915`` 916// return elements intersecting box 917tree.query(bgi::intersects(box), std::back_inserter(result)); 918// return elements intersecting poly but not within box 919tree.query(bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result)); 920// return elements overlapping box and meeting my_fun unary predicate 921tree.query(bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result)); 922// return 5 elements nearest to pt and elements are intersecting box 923tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result)); 924 925// For each found value do_something (it is a type of function object) 926tree.query(bgi::intersects(box), 927 boost::make_function_output_iterator(do_something())); 928 929// For each value stored in the rtree do_something 930// always_true is a type of function object always returning true 931tree.query(bgi::satisfies(always_true()), 932 boost::make_function_output_iterator(do_something())); 933 934// C++11 (lambda expression) 935tree.query(bgi::intersects(box), 936 boost::make_function_output_iterator([](value_type const& val){ 937 // do something 938 })); 939 940// C++14 (generic lambda expression) 941tree.query(bgi::intersects(box), 942 boost::make_function_output_iterator([](auto const& val){ 943 // do something 944 })); 945`` 946 947 948[heading Throws] 949If Value copy constructor or copy assignment throws. If predicates copy throws. 950 951[warning Only one [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()]] predicate may be passed to the query. Passing more of them results in compile-time error.] 952 953[endsect] 954 955[#classboost_1_1geometry_1_1index_1_1rtree_1a874f43d4119f552a613f051c6177b9d8] 956[section qbegin(Predicates const &)] 957'''<indexterm><primary>qbegin</primary></indexterm>''' 958Returns a query iterator pointing at the begin of the query range. 959 960[heading Description] 961This method returns an iterator which may be used to perform iterative queries. For the information about predicates which may be passed to this method see [link classboost_1_1geometry_1_1index_1_1rtree_1ace0ba7f3280b1074cea31b4f1bc1d7ea query()].[heading Synopsis] 962[pre 963`template<``typename Predicates``>` 964[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855 const_query_iterator]] `qbegin``(``Predicates const &` `predicates``)` 965] 966 967[heading Modifier(s)] 968``const ``[heading Parameter(s)] 969[table 970[[Type][Name][Description]] 971[[`Predicates const &`][ `predicates` ][Predicates.]] 972] 973[heading Returns] 974The iterator pointing at the begin of the query range. 975[heading Example] 976 977`` 978for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ; 979 it != tree.qend() ; ++it ) 980{ 981 // do something with value 982 if ( has_enough_nearest_values() ) 983 break; 984} 985 986// C++11 (auto) 987for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it ) 988{ 989 // do something with value 990} 991 992// C++14 (generic lambda expression) 993std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){ 994 // do something with value 995}); 996`` 997 998 999[heading Iterator category] 1000ForwardIterator 1001 1002[heading Throws] 1003If predicates copy throws. If allocation throws. 1004 1005[warning The modification of the rtree may invalidate the iterators.] 1006 1007[endsect] 1008 1009[#classboost_1_1geometry_1_1index_1_1rtree_1a4950060dcd8647acbddfbeb38d453253] 1010[section qend()] 1011'''<indexterm><primary>qend</primary></indexterm>''' 1012Returns a query iterator pointing at the end of the query range. 1013 1014[heading Description] 1015This method returns an iterator which may be used to check if the query has ended.[heading Synopsis] 1016[pre 1017 1018[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855 const_query_iterator]] `qend``()` 1019] 1020 1021[heading Modifier(s)] 1022``const ``[heading Returns] 1023The iterator pointing at the end of the query range. 1024[heading Example] 1025 1026`` 1027for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ; 1028 it != tree.qend() ; ++it ) 1029{ 1030 // do something with value 1031 if ( has_enough_nearest_values() ) 1032 break; 1033} 1034 1035// C++11 (auto) 1036for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it ) 1037{ 1038 // do something with value 1039} 1040 1041// C++14 (generic lambda expression) 1042std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){ 1043 // do something with value 1044}); 1045`` 1046 1047 1048[heading Iterator category] 1049ForwardIterator 1050 1051[heading Throws] 1052Nothing 1053 1054[warning The modification of the rtree may invalidate the iterators.] 1055 1056[endsect] 1057 1058[#classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31] 1059[section begin()] 1060'''<indexterm><primary>begin</primary></indexterm>''' 1061Returns the iterator pointing at the begin of the rtree values range. 1062 1063[heading Description] 1064This method returns the iterator which may be used to iterate over all values stored in the rtree.[heading Synopsis] 1065[pre 1066 1067[^[link classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde const_iterator]] `begin``()` 1068] 1069 1070[heading Modifier(s)] 1071``const ``[heading Returns] 1072The iterator pointing at the begin of the range. 1073[heading Example] 1074 1075`` 1076// Copy all values into the vector 1077std::copy(tree.begin(), tree.end(), std::back_inserter(vec)); 1078 1079for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it ) 1080{ 1081 // do something with value 1082} 1083 1084// C++11 (auto) 1085for ( auto it = tree.begin() ; it != tree.end() ; ++it ) 1086{ 1087 // do something with value 1088} 1089 1090// C++14 (generic lambda expression) 1091std::for_each(tree.begin(), tree.end(), [](auto const& val){ 1092 // do something with value 1093}) 1094`` 1095 1096 1097[heading Iterator category] 1098ForwardIterator 1099 1100[heading Throws] 1101If allocation throws. 1102 1103[warning The modification of the rtree may invalidate the iterators.] 1104 1105[endsect] 1106 1107[#classboost_1_1geometry_1_1index_1_1rtree_1a5c8b735055ac44dd1d354359c5a0b910] 1108[section end()] 1109'''<indexterm><primary>end</primary></indexterm>''' 1110Returns the iterator pointing at the end of the rtree values range. 1111 1112[heading Description] 1113This method returns the iterator which may be compared with the iterator returned by [link classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31 begin()] in order to check if the iteration has ended.[heading Synopsis] 1114[pre 1115 1116[^[link classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde const_iterator]] `end``()` 1117] 1118 1119[heading Modifier(s)] 1120``const ``[heading Returns] 1121The iterator pointing at the end of the range. 1122[heading Example] 1123 1124`` 1125for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it ) 1126{ 1127 // do something with value 1128} 1129 1130// C++11 (lambda expression) 1131std::for_each(tree.begin(), tree.end(), [](value_type const& val){ 1132 // do something with value 1133}) 1134`` 1135 1136 1137[heading Iterator category] 1138ForwardIterator 1139 1140[heading Throws] 1141Nothing. 1142 1143[warning The modification of the rtree may invalidate the iterators.] 1144 1145[endsect] 1146 1147[#classboost_1_1geometry_1_1index_1_1rtree_1a7a7bfa3ce751e0c357c36e1bb238c523] 1148[section size()] 1149'''<indexterm><primary>size</primary></indexterm>''' 1150Returns the number of stored values. 1151 1152[heading Synopsis] 1153[pre 1154 1155[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `size``()` 1156] 1157 1158[heading Modifier(s)] 1159``const ``[heading Returns] 1160The number of stored values. 1161[heading Throws] 1162Nothing. 1163 1164[endsect] 1165 1166[#classboost_1_1geometry_1_1index_1_1rtree_1a18bed92ff302df192215c3809fe5272e] 1167[section empty()] 1168'''<indexterm><primary>empty</primary></indexterm>''' 1169Query if the container is empty. 1170 1171[heading Synopsis] 1172[pre 1173 1174`bool` `empty``()` 1175] 1176 1177[heading Modifier(s)] 1178``const ``[heading Returns] 1179true if the container is empty. 1180[heading Throws] 1181Nothing. 1182 1183[endsect] 1184 1185[#classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c] 1186[section clear()] 1187'''<indexterm><primary>clear</primary></indexterm>''' 1188Removes all values stored in the container. 1189 1190[heading Synopsis] 1191[pre 1192 1193`void` `clear``()` 1194] 1195 1196[heading Throws] 1197Nothing. 1198 1199[endsect] 1200 1201[#classboost_1_1geometry_1_1index_1_1rtree_1a2f244b24b24711dc39019198151dc2db] 1202[section bounds()] 1203'''<indexterm><primary>bounds</primary></indexterm>''' 1204Returns the box able to contain all values stored in the container. 1205 1206[heading Description] 1207Returns 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] 1208[pre 1209 1210[^[link classboost_1_1geometry_1_1index_1_1rtree_1a12e80f9da4c68e0e687f1c2012321147 bounds_type]] `bounds``()` 1211] 1212 1213[heading Modifier(s)] 1214``const ``[heading Returns] 1215The box able to contain all values stored in the container or an invalid box if there are no values in the container. 1216[heading Throws] 1217Nothing. 1218 1219[endsect] 1220 1221[#classboost_1_1geometry_1_1index_1_1rtree_1a69dfe7fea7dac9513b79b9918bbf8050] 1222[section count(ValueOrIndexable const &)] 1223'''<indexterm><primary>count</primary></indexterm>''' 1224Count Values or Indexables stored in the container. 1225 1226[heading Description] 1227For 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] 1228[pre 1229`template<``typename ValueOrIndexable``>` 1230[^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `count``(``ValueOrIndexable const &` `vori``)` 1231] 1232 1233[heading Modifier(s)] 1234``const ``[heading Parameter(s)] 1235[table 1236[[Type][Name][Description]] 1237[[`ValueOrIndexable const &`][ `vori` ][The value or indexable which will be counted.]] 1238] 1239[heading Returns] 1240The number of values found. 1241[heading Throws] 1242Nothing. 1243 1244[endsect] 1245 1246[#classboost_1_1geometry_1_1index_1_1rtree_1a4968c4543d315372b4c24fc4b571c3c5] 1247[section parameters()] 1248'''<indexterm><primary>parameters</primary></indexterm>''' 1249Returns parameters. 1250 1251[heading Synopsis] 1252[pre 1253 1254[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]] `parameters``()` 1255] 1256 1257[heading Modifier(s)] 1258``const ``[heading Returns] 1259The parameters object. 1260[heading Throws] 1261Nothing. 1262 1263[endsect] 1264 1265[#classboost_1_1geometry_1_1index_1_1rtree_1abf1759583c5ae7284dbe53e904eec455] 1266[section indexable_get()] 1267'''<indexterm><primary>indexable_get</primary></indexterm>''' 1268Returns function retrieving Indexable from Value. 1269 1270[heading Synopsis] 1271[pre 1272 1273[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]] `indexable_get``()` 1274] 1275 1276[heading Modifier(s)] 1277``const ``[heading Returns] 1278The indexable_getter object. 1279[heading Throws] 1280Nothing. 1281 1282[endsect] 1283 1284[#classboost_1_1geometry_1_1index_1_1rtree_1ae7d1516455b9565fbddff04db202b223] 1285[section value_eq()] 1286'''<indexterm><primary>value_eq</primary></indexterm>''' 1287Returns function comparing Values. 1288 1289[heading Synopsis] 1290[pre 1291 1292[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]] `value_eq``()` 1293] 1294 1295[heading Modifier(s)] 1296``const ``[heading Returns] 1297The value_equal function. 1298[heading Throws] 1299Nothing. 1300 1301[endsect] 1302 1303[#classboost_1_1geometry_1_1index_1_1rtree_1a256cfca98dba150a63fd2023934dbd1a] 1304[section get_allocator()] 1305'''<indexterm><primary>get_allocator</primary></indexterm>''' 1306Returns allocator used by the rtree. 1307 1308[heading Synopsis] 1309[pre 1310 1311[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]] `get_allocator``()` 1312] 1313 1314[heading Modifier(s)] 1315``const ``[heading Returns] 1316The allocator. 1317[heading Throws] 1318If allocator copy constructor throws. 1319 1320[endsect] 1321 1322[endsect] 1323 1324