rtree_functions.qbk 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. [/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
  2. [/ Generated from xml/group__rtree__functions.xml]
  3. [section:group__rtree__functions R-tree free functions (boost::geometry::index::)]
  4. [heading Functions]
  5. [table
  6. [[Function][Description]]
  7. [[[link group__rtree__functions_1gada4f62111ed22eb2860ea30995c1ce60 `insert(rtree<...> &, Value const &)`]][Insert a value to the index. ]]
  8. [[[link group__rtree__functions_1ga056469ea699e609e67762fe1b789997f `insert(rtree<...> &, Iterator, Iterator)`]][Insert a range of values to the index. ]]
  9. [[[link group__rtree__functions_1gab4edad000d63eb103f2dad3813ceb2b3 `insert(rtree<...> &, ConvertibleOrRange const &)`]][Insert a value created using convertible object or a range of values to the index. ]]
  10. [[[link group__rtree__functions_1gaf353d90fd933e6110b031f63166fb45a `remove(rtree<...> &, Value const &)`]][Remove a value from the container. ]]
  11. [[[link group__rtree__functions_1gaa460a8985496cf133f63f245527ac6e7 `remove(rtree<...> &, Iterator, Iterator)`]][Remove a range of values from the container. ]]
  12. [[[link group__rtree__functions_1ga700c922f8b4d5ebd073e999e12b55249 `remove(rtree<...> &, ConvertibleOrRange const &)`]][Remove a value corresponding to an object convertible to it or a range of values from the container. ]]
  13. [[[link group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95 `query(rtree<...> const &, Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]]
  14. [[[link group__rtree__functions_1ga45c2b7b112bf730d10367e10df62aa3c `qbegin(rtree<...> const &, Predicates const &)`]][Returns the query iterator pointing at the begin of the query range. ]]
  15. [[[link group__rtree__functions_1ga5c9a1eb0421bf2c702392247d48143e5 `qend(rtree<...> const &)`]][Returns the query iterator pointing at the end of the query range. ]]
  16. [[[link group__rtree__functions_1ga2467dc6ac90303496abd6ebd136eba18 `begin(rtree<...> const &)`]][Returns the iterator pointing at the begin of the rtree values range. ]]
  17. [[[link group__rtree__functions_1ga8fd1e53d8492643cbc9840ff715bb736 `end(rtree<...> const &)`]][Returns the iterator pointing at the end of the rtree values range. ]]
  18. [[[link group__rtree__functions_1gabaca6c24c3838a8164aa3700c459e7a4 `clear(rtree<...> &)`]][Remove all values from the index. ]]
  19. [[[link group__rtree__functions_1gaa19a09e7b5f0a86a4b74ef2342de1d68 `size(rtree<...> const &)`]][Get the number of values stored in the index. ]]
  20. [[[link group__rtree__functions_1gaba44e2fb12fdc7b528bfee56a88e0844 `empty(rtree<...> const &)`]][Query if there are no values stored in the index. ]]
  21. [[[link group__rtree__functions_1ga4e43e7720c66e88959ff511a7462a3ff `bounds(rtree<...> const &)`]][Get the box containing all stored values or an invalid box if the index has no values. ]]
  22. [[[link group__rtree__functions_1gaa1250318a78d7e27ba8f3537eb0ddb3f `swap(rtree<...> &, rtree<...> &)`]][Exchanges the contents of the container with those of other. ]]
  23. ]
  24. [#group__rtree__functions_1gada4f62111ed22eb2860ea30995c1ce60]
  25. [section insert(rtree<...> &, Value const &)]
  26. '''<indexterm><primary>insert</primary></indexterm>'''
  27. Insert a value to the index.
  28. [heading Description]
  29. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86 rtree::insert(value_type const&)]].[heading Synopsis]
  30. [pre
  31. `template<``typename Value``,`
  32. `typename Parameters``,`
  33. `typename IndexableGetter``,`
  34. `typename EqualTo``,`
  35. `typename Allocator``>`
  36. `void` `insert``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Value const &` `v``)`
  37. ]
  38. [heading Parameter(s)]
  39. [table
  40. [[Type][Name][Description]]
  41. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  42. [[`Value const &`][ `v` ][The value which will be stored in the index. ]]
  43. ]
  44. [endsect]
  45. [#group__rtree__functions_1ga056469ea699e609e67762fe1b789997f]
  46. [section insert(rtree<...> &, Iterator, Iterator)]
  47. '''<indexterm><primary>insert</primary></indexterm>'''
  48. Insert a range of values to the index.
  49. [heading Description]
  50. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d rtree::insert(Iterator, Iterator)]].[heading Synopsis]
  51. [pre
  52. `template<``typename Value``,`
  53. `typename Parameters``,`
  54. `typename IndexableGetter``,`
  55. `typename EqualTo``,`
  56. `typename Allocator``,`
  57. `typename Iterator``>`
  58. `void` `insert``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,`
  59. `Iterator` `first``,`
  60. `Iterator` `last``)`
  61. ]
  62. [heading Parameter(s)]
  63. [table
  64. [[Type][Name][Description]]
  65. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  66. [[`Iterator`][ `first` ][The beginning of the range of values. ]]
  67. [[`Iterator`][ `last` ][The end of the range of values. ]]
  68. ]
  69. [endsect]
  70. [#group__rtree__functions_1gab4edad000d63eb103f2dad3813ceb2b3]
  71. [section insert(rtree<...> &, ConvertibleOrRange const &)]
  72. '''<indexterm><primary>insert</primary></indexterm>'''
  73. Insert a value created using convertible object or a range of values to the index.
  74. [heading Description]
  75. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a5db294b14ebf1319edcfc92e78c8167e rtree::insert(ConvertibleOrRange const&)]].[heading Synopsis]
  76. [pre
  77. `template<``typename Value``,`
  78. `typename Parameters``,`
  79. `typename IndexableGetter``,`
  80. `typename EqualTo``,`
  81. `typename Allocator``,`
  82. `typename ConvertibleOrRange``>`
  83. `void` `insert``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `ConvertibleOrRange const &` `conv_or_rng``)`
  84. ]
  85. [heading Parameter(s)]
  86. [table
  87. [[Type][Name][Description]]
  88. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  89. [[`ConvertibleOrRange const &`][ `conv_or_rng` ][The object of type convertible to value_type or a range of values. ]]
  90. ]
  91. [endsect]
  92. [#group__rtree__functions_1gaf353d90fd933e6110b031f63166fb45a]
  93. [section remove(rtree<...> &, Value const &)]
  94. '''<indexterm><primary>remove</primary></indexterm>'''
  95. Remove a value from the container.
  96. [heading Description]
  97. Remove a value from the container. In contrast to the [^`std::set`] or [^`std::map erase()`] method this function removes only one value from the container.
  98. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4 rtree::remove(value_type const&)]].[heading Synopsis]
  99. [pre
  100. `template<``typename Value``,`
  101. `typename Parameters``,`
  102. `typename IndexableGetter``,`
  103. `typename EqualTo``,`
  104. `typename Allocator``>`
  105. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type` `remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Value const &` `v``)`
  106. ]
  107. [heading Parameter(s)]
  108. [table
  109. [[Type][Name][Description]]
  110. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  111. [[`Value const &`][ `v` ][The value which will be removed from the index.]]
  112. ]
  113. [heading Returns]
  114. 1 if value was removed, 0 otherwise.
  115. [endsect]
  116. [#group__rtree__functions_1gaa460a8985496cf133f63f245527ac6e7]
  117. [section remove(rtree<...> &, Iterator, Iterator)]
  118. '''<indexterm><primary>remove</primary></indexterm>'''
  119. Remove a range of values from the container.
  120. [heading Description]
  121. Remove a range of values from the container. 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 function removes only one value for each one passed in the range, not all equal values.
  122. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa rtree::remove(Iterator, Iterator)]].[heading Synopsis]
  123. [pre
  124. `template<``typename Value``,`
  125. `typename Parameters``,`
  126. `typename IndexableGetter``,`
  127. `typename EqualTo``,`
  128. `typename Allocator``,`
  129. `typename Iterator``>`
  130. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type` `remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,`
  131. `Iterator` `first``,`
  132. `Iterator` `last``)`
  133. ]
  134. [heading Parameter(s)]
  135. [table
  136. [[Type][Name][Description]]
  137. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  138. [[`Iterator`][ `first` ][The beginning of the range of values. ]]
  139. [[`Iterator`][ `last` ][The end of the range of values.]]
  140. ]
  141. [heading Returns]
  142. The number of removed values.
  143. [endsect]
  144. [#group__rtree__functions_1ga700c922f8b4d5ebd073e999e12b55249]
  145. [section remove(rtree<...> &, ConvertibleOrRange const &)]
  146. '''<indexterm><primary>remove</primary></indexterm>'''
  147. Remove a value corresponding to an object convertible to it or a range of values from the container.
  148. [heading Description]
  149. Remove a value corresponding to an object convertible to it or a range of values from the container. 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.
  150. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a320cd1861ba7b43364ed53e1f93a4411 rtree::remove(ConvertibleOrRange const&)]].[heading Synopsis]
  151. [pre
  152. `template<``typename Value``,`
  153. `typename Parameters``,`
  154. `typename IndexableGetter``,`
  155. `typename EqualTo``,`
  156. `typename Allocator``,`
  157. `typename ConvertibleOrRange``>`
  158. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type` `remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `ConvertibleOrRange const &` `conv_or_rng``)`
  159. ]
  160. [heading Parameter(s)]
  161. [table
  162. [[Type][Name][Description]]
  163. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  164. [[`ConvertibleOrRange const &`][ `conv_or_rng` ][The object of type convertible to value_type or the range of values.]]
  165. ]
  166. [heading Returns]
  167. The number of removed values.
  168. [endsect]
  169. [#group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95]
  170. [section query(rtree<...> const &, Predicates const &, OutIter)]
  171. '''<indexterm><primary>query</primary></indexterm>'''
  172. Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
  173. [heading Description]
  174. 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.
  175. [*Spatial predicates]
  176. Spatial predicates may be generated by one of the functions listed below:
  177. * [^[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]],
  178. * [^[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]],
  179. * [^[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]],
  180. * [^[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]],
  181. * [^[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]],
  182. * [^[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]],
  183. * [^[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]],
  184. It is possible to negate spatial predicates:
  185. * [^`! `[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]],
  186. * [^`! `[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]],
  187. * [^`! `[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]],
  188. * [^`! `[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]],
  189. * [^`! `[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]],
  190. * [^`! `[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]],
  191. * [^`! `[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]]
  192. [*Satisfies predicate]
  193. 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:
  194. * [^[link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c boost::geometry::index::satisfies()]].
  195. [*Nearest predicate]
  196. 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:
  197. * [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e boost::geometry::index::nearest()]].
  198. [*Connecting predicates]
  199. Predicates may be passed together connected with [^`operator&&()`].[heading Synopsis]
  200. [pre
  201. `template<``typename Value``,`
  202. `typename Parameters``,`
  203. `typename IndexableGetter``,`
  204. `typename EqualTo``,`
  205. `typename Allocator``,`
  206. `typename Predicates``,`
  207. `typename OutIter``>`
  208. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type` `query``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``,`
  209. `Predicates const &` `predicates``,`
  210. `OutIter` `out_it``)`
  211. ]
  212. [heading Parameter(s)]
  213. [table
  214. [[Type][Name][Description]]
  215. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The rtree. ]]
  216. [[`Predicates const &`][ `predicates` ][Predicates. ]]
  217. [[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]]
  218. ]
  219. [heading Returns]
  220. The number of values found.
  221. [heading Example]
  222. ``
  223. // return elements intersecting box
  224. bgi::query(tree, bgi::intersects(box), std::back_inserter(result));
  225. // return elements intersecting poly but not within box
  226. bgi::query(tree, bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
  227. // return elements overlapping box and meeting my_fun value predicate
  228. bgi::query(tree, bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result));
  229. // return 5 elements nearest to pt and elements are intersecting box
  230. bgi::query(tree, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
  231. // For each found value do_something (it is a type of function object)
  232. tree.query(bgi::intersects(box),
  233. boost::make_function_output_iterator(do_something()));
  234. ``
  235. [heading Throws]
  236. If Value copy constructor or copy assignment throws.
  237. [warning Only one [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()]] predicate may be passed to the query. Passing more of them results in compile-time error.]
  238. [endsect]
  239. [#group__rtree__functions_1ga45c2b7b112bf730d10367e10df62aa3c]
  240. [section qbegin(rtree<...> const &, Predicates const &)]
  241. '''<indexterm><primary>qbegin</primary></indexterm>'''
  242. Returns the query iterator pointing at the begin of the query range.
  243. [heading Description]
  244. This method returns the iterator which may be used to perform iterative queries. For the information about the predicates which may be passed to this method see [link group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95 query()].[heading Synopsis]
  245. [pre
  246. `template<``typename Value``,`
  247. `typename Parameters``,`
  248. `typename IndexableGetter``,`
  249. `typename EqualTo``,`
  250. `typename Allocator``,`
  251. `typename Predicates``>`
  252. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::const_query_iterator` `qbegin``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``,` `Predicates const &` `predicates``)`
  253. ]
  254. [heading Parameter(s)]
  255. [table
  256. [[Type][Name][Description]]
  257. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The rtree. ]]
  258. [[`Predicates const &`][ `predicates` ][Predicates.]]
  259. ]
  260. [heading Returns]
  261. The iterator pointing at the begin of the query range.
  262. [heading Example]
  263. ``
  264. std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something());
  265. ``
  266. [heading Iterator category]
  267. ForwardIterator
  268. [heading Throws]
  269. If predicates copy throws. If allocation throws.
  270. [warning The modification of the rtree may invalidate the iterators.]
  271. [endsect]
  272. [#group__rtree__functions_1ga5c9a1eb0421bf2c702392247d48143e5]
  273. [section qend(rtree<...> const &)]
  274. '''<indexterm><primary>qend</primary></indexterm>'''
  275. Returns the query iterator pointing at the end of the query range.
  276. [heading Description]
  277. This method returns the iterator which may be used to check if the query has ended.[heading Synopsis]
  278. [pre
  279. `template<``typename Value``,`
  280. `typename Parameters``,`
  281. `typename IndexableGetter``,`
  282. `typename EqualTo``,`
  283. `typename Allocator``>`
  284. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::const_query_iterator` `qend``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  285. ]
  286. [heading Returns]
  287. The iterator pointing at the end of the query range.
  288. [heading Example]
  289. ``
  290. std::for_each(bgi::qbegin(tree, bgi::nearest(pt, 3)), bgi::qend(tree), do_something());
  291. ``
  292. [heading Iterator category]
  293. ForwardIterator
  294. [heading Throws]
  295. Nothing
  296. [warning The modification of the rtree may invalidate the iterators.]
  297. [endsect]
  298. [#group__rtree__functions_1ga2467dc6ac90303496abd6ebd136eba18]
  299. [section begin(rtree<...> const &)]
  300. '''<indexterm><primary>begin</primary></indexterm>'''
  301. Returns the iterator pointing at the begin of the rtree values range.
  302. [heading Description]
  303. This method returns the iterator which may be used to iterate over all values stored in the rtree.[heading Synopsis]
  304. [pre
  305. `template<``typename Value``,`
  306. `typename Parameters``,`
  307. `typename IndexableGetter``,`
  308. `typename EqualTo``,`
  309. `typename Allocator``>`
  310. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::const_iterator` `begin``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  311. ]
  312. [heading Returns]
  313. The iterator pointing at the begin of the range.
  314. [heading Example]
  315. ``
  316. std::for_each(bgi::begin(tree), bgi::end(tree), do_something());
  317. // the same as
  318. std::for_each(boost::begin(tree), boost::end(tree), do_something());
  319. ``
  320. [heading Iterator category]
  321. ForwardIterator
  322. [heading Throws]
  323. If allocation throws.
  324. [warning The modification of the rtree may invalidate the iterators.]
  325. [endsect]
  326. [#group__rtree__functions_1ga8fd1e53d8492643cbc9840ff715bb736]
  327. [section end(rtree<...> const &)]
  328. '''<indexterm><primary>end</primary></indexterm>'''
  329. Returns the iterator pointing at the end of the rtree values range.
  330. [heading Description]
  331. This method returns the iterator which may be compared with the iterator returned by [link group__rtree__functions_1ga2467dc6ac90303496abd6ebd136eba18 begin()] in order to check if the iteration has ended.[heading Synopsis]
  332. [pre
  333. `template<``typename Value``,`
  334. `typename Parameters``,`
  335. `typename IndexableGetter``,`
  336. `typename EqualTo``,`
  337. `typename Allocator``>`
  338. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::const_iterator` `end``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  339. ]
  340. [heading Returns]
  341. The iterator pointing at the end of the range.
  342. [heading Example]
  343. ``
  344. std::for_each(bgi::begin(tree), bgi::end(tree), do_something());
  345. // the same as
  346. std::for_each(boost::begin(tree), boost::end(tree), do_something());
  347. ``
  348. [heading Iterator category]
  349. ForwardIterator
  350. [heading Throws]
  351. Nothing.
  352. [warning The modification of the rtree may invalidate the iterators.]
  353. [endsect]
  354. [#group__rtree__functions_1gabaca6c24c3838a8164aa3700c459e7a4]
  355. [section clear(rtree<...> &)]
  356. '''<indexterm><primary>clear</primary></indexterm>'''
  357. Remove all values from the index.
  358. [heading Description]
  359. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c rtree::clear()]].[heading Synopsis]
  360. [pre
  361. `template<``typename Value``,`
  362. `typename Parameters``,`
  363. `typename IndexableGetter``,`
  364. `typename EqualTo``,`
  365. `typename Allocator``>`
  366. `void` `clear``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``)`
  367. ]
  368. [heading Parameter(s)]
  369. [table
  370. [[Type][Name][Description]]
  371. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]]
  372. ]
  373. [endsect]
  374. [#group__rtree__functions_1gaa19a09e7b5f0a86a4b74ef2342de1d68]
  375. [section size(rtree<...> const &)]
  376. '''<indexterm><primary>size</primary></indexterm>'''
  377. Get the number of values stored in the index.
  378. [heading Description]
  379. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a7a7bfa3ce751e0c357c36e1bb238c523 rtree::size()]].[heading Synopsis]
  380. [pre
  381. `template<``typename Value``,`
  382. `typename Parameters``,`
  383. `typename IndexableGetter``,`
  384. `typename EqualTo``,`
  385. `typename Allocator``>`
  386. `size_t` `size``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  387. ]
  388. [heading Parameter(s)]
  389. [table
  390. [[Type][Name][Description]]
  391. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]]
  392. ]
  393. [heading Returns]
  394. The number of values stored in the index.
  395. [endsect]
  396. [#group__rtree__functions_1gaba44e2fb12fdc7b528bfee56a88e0844]
  397. [section empty(rtree<...> const &)]
  398. '''<indexterm><primary>empty</primary></indexterm>'''
  399. Query if there are no values stored in the index.
  400. [heading Description]
  401. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a18bed92ff302df192215c3809fe5272e rtree::empty()]].[heading Synopsis]
  402. [pre
  403. `template<``typename Value``,`
  404. `typename Parameters``,`
  405. `typename IndexableGetter``,`
  406. `typename EqualTo``,`
  407. `typename Allocator``>`
  408. `bool` `empty``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  409. ]
  410. [heading Parameter(s)]
  411. [table
  412. [[Type][Name][Description]]
  413. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]]
  414. ]
  415. [heading Returns]
  416. true if there are no values in the index.
  417. [endsect]
  418. [#group__rtree__functions_1ga4e43e7720c66e88959ff511a7462a3ff]
  419. [section bounds(rtree<...> const &)]
  420. '''<indexterm><primary>bounds</primary></indexterm>'''
  421. Get the box containing all stored values or an invalid box if the index has no values.
  422. [heading Description]
  423. It calls [^`rtree::envelope()`].[heading Synopsis]
  424. [pre
  425. `template<``typename Value``,`
  426. `typename Parameters``,`
  427. `typename IndexableGetter``,`
  428. `typename EqualTo``,`
  429. `typename Allocator``>`
  430. `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::bounds_type` `bounds``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)`
  431. ]
  432. [heading Parameter(s)]
  433. [table
  434. [[Type][Name][Description]]
  435. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]]
  436. ]
  437. [heading Returns]
  438. The box containing all stored values or an invalid box.
  439. [endsect]
  440. [#group__rtree__functions_1gaa1250318a78d7e27ba8f3537eb0ddb3f]
  441. [section swap(rtree<...> &, rtree<...> &)]
  442. '''<indexterm><primary>swap</primary></indexterm>'''
  443. Exchanges the contents of the container with those of other.
  444. [heading Description]
  445. It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b rtree::swap()]].[heading Synopsis]
  446. [pre
  447. `template<``typename Value``,`
  448. `typename Parameters``,`
  449. `typename IndexableGetter``,`
  450. `typename EqualTo``,`
  451. `typename Allocator``>`
  452. `void` `swap``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `l``,` `rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `r``)`
  453. ]
  454. [heading Parameter(s)]
  455. [table
  456. [[Type][Name][Description]]
  457. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `l` ][The first rtree. ]]
  458. [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `r` ][The second rtree. ]]
  459. ]
  460. [endsect]
  461. [endsect]