rtree.qbk 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109
  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. '''<indexterm><primary>boost</primary></indexterm><indexterm><primary>geometry</primary></indexterm><indexterm><primary>index</primary></indexterm><indexterm><primary>rtree</primary></indexterm>'''
  6. The R-tree spatial index.
  7. [heading Description]
  8. This is self-balancing spatial index capable to store various types of Values and balancing algorithms.
  9. [heading Parameters]
  10. 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.
  11. Predefined algorithms with compile-time parameters are:
  12. * [^[link structboost_1_1geometry_1_1index_1_1linear boost::geometry::index::linear]],
  13. * [^[link structboost_1_1geometry_1_1index_1_1quadratic boost::geometry::index::quadratic]],
  14. * [^[link structboost_1_1geometry_1_1index_1_1rstar boost::geometry::index::rstar]].
  15. Predefined algorithms with run-time parameters are:
  16. * [^[link classboost_1_1geometry_1_1index_1_1dynamic__linear boost::geometry::index::dynamic_linear]],
  17. * [^[link classboost_1_1geometry_1_1index_1_1dynamic__quadratic boost::geometry::index::dynamic_quadratic]],
  18. * [^[link classboost_1_1geometry_1_1index_1_1dynamic__rstar boost::geometry::index::dynamic_rstar]].
  19. [heading IndexableGetter]
  20. The 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&`].
  21. [heading EqualTo]
  22. The 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.
  23. [heading Header]
  24. `#include <boost/geometry/index/rtree.hpp>`
  25. [heading Synopsis]
  26. [pre
  27. `template<``typename Value``,`
  28. `typename Parameters``,`
  29. `typename IndexableGetter` = [^[link structboost_1_1geometry_1_1index_1_1indexable index::indexable]]`<Value>``,`
  30. `typename EqualTo` = [^[link structboost_1_1geometry_1_1index_1_1equal__to index::equal_to]]`<Value>``,`
  31. `typename Allocator` = `boost::container::new_allocator<Value>``>`
  32. `class rtree`
  33. `{`
  34. ` // ...`
  35. `};`
  36. ]
  37. [heading Template parameter(s)]
  38. [table
  39. [[Parameter] [Description]]
  40. [[`Value`][The type of objects stored in the container. ]]
  41. [[`Parameters`][Compile-time parameters. ]]
  42. [[`IndexableGetter`][The function object extracting Indexable from Value. ]]
  43. [[`EqualTo`][The function object comparing objects of type Value. ]]
  44. [[`Allocator`][The allocator used to allocate/deallocate memory, construct/destroy nodes and Values. ]]
  45. ]
  46. [heading Typedef(s)]
  47. [table
  48. [[Type] [Description]]
  49. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757] `value_type`][The type of Value stored in the container. ]]
  50. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17] `parameters_type`][R-tree parameters type. ]]
  51. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5] `indexable_getter`][The function object extracting Indexable from Value. ]]
  52. [[[#classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b] `value_equal`][The function object comparing objects of type Value. ]]
  53. [[[#classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e] `allocator_type`][The type of allocator used by the container. ]]
  54. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a28e88e55d260a454688fe1bd5e5af96b] `indexable_type`][The Indexable type to which Value is translated. ]]
  55. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a12e80f9da4c68e0e687f1c2012321147] `bounds_type`][The Box type used by the R-tree. ]]
  56. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a5301c3d7ee3589751579e0573a9e8165] `reference`][Type of reference to Value. ]]
  57. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a615e622930be97ab1f3b8ceee641feaf] `const_reference`][Type of reference to const Value. ]]
  58. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a762ced6b98d2cc6503e2b00549c6a89a] `pointer`][Type of pointer to Value. ]]
  59. [[[#classboost_1_1geometry_1_1index_1_1rtree_1abad30462044d5d8fb607c24a05e8c9c2] `const_pointer`][Type of pointer to const Value. ]]
  60. [[[#classboost_1_1geometry_1_1index_1_1rtree_1ac256168e9371a070515fc61f29c691ed] `difference_type`][Type of difference type. ]]
  61. [[[#classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5] `size_type`][Unsigned integral type used by the container. ]]
  62. [[[#classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde] `const_iterator`][Type of const iterator, category ForwardIterator. ]]
  63. [[[#classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855] `const_query_iterator`][Type of const query iterator, category ForwardIterator. ]]
  64. ]
  65. [heading Constructor(s) and destructor]
  66. [table
  67. [[Function][Description]]
  68. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a55d5fd5d205df08db5267253689ccf0c `rtree()`]][The constructor. ]]
  69. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a1a6b696d4855cbf1866196fe058c3a87 `rtree(parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &)`]][The constructor. ]]
  70. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a037f17d8a1dfa4a818ff471dec61c912 `rtree(Iterator, Iterator)`]][The constructor. ]]
  71. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a7b96b715c52ddc13d7a81db344825848 `rtree(Range const &)`]][The constructor. ]]
  72. [[[link classboost_1_1geometry_1_1index_1_1rtree_1af8db72811d2be53c409240204e63fb5a `~rtree()`]][The destructor. ]]
  73. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a826fc3236e181ad718d5283e95d7866f `rtree(rtree const &)`]][The copy constructor. ]]
  74. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a72b6b75e083eea2ed26f54d4a2265375 `rtree(rtree const &, allocator_type const &)`]][The copy constructor. ]]
  75. [[[link classboost_1_1geometry_1_1index_1_1rtree_1aa8b27db8cb783282ab5274e6769da26a `rtree(rtree &&)`]][The moving constructor. ]]
  76. [[[link classboost_1_1geometry_1_1index_1_1rtree_1a8508c4236d17ff39a1caef058aac8486 `rtree(rtree &&, allocator_type const &)`]][The moving constructor. ]]
  77. ]
  78. [heading Member(s)]
  79. [table
  80. [[Modifier][Function][Description]]
  81. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1ad0db5e9e41e1553f944b7e740dbbb883 `operator=(rtree const &)`]][The assignment operator. ]]
  82. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1af0bf9622ed3e901580b73ed39b746fb7 `operator=(rtree &&)`]][The moving assignment. ]]
  83. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b `swap(rtree &)`]][Swaps contents of two rtrees. ]]
  84. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86 `insert(value_type const &)`]][Insert a value to the index. ]]
  85. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d `insert(Iterator, Iterator)`]][Insert a range of values to the index. ]]
  86. [[][[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. ]]
  87. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4 `remove(value_type const &)`]][Remove a value from the container. ]]
  88. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]]
  89. [[][[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. ]]
  90. [[ `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. ]]
  91. [[ `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. ]]
  92. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4950060dcd8647acbddfbeb38d453253 `qend()`]][Returns a query iterator pointing at the end of the query range. ]]
  93. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31 `begin()`]][Returns the iterator pointing at the begin of the rtree values range. ]]
  94. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a5c8b735055ac44dd1d354359c5a0b910 `end()`]][Returns the iterator pointing at the end of the rtree values range. ]]
  95. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a7a7bfa3ce751e0c357c36e1bb238c523 `size()`]][Returns the number of stored values. ]]
  96. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a18bed92ff302df192215c3809fe5272e `empty()`]][Query if the container is empty. ]]
  97. [[][[link classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c `clear()`]][Removes all values stored in the container. ]]
  98. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a2f244b24b24711dc39019198151dc2db `bounds()`]][Returns the box able to contain all values stored in the container. ]]
  99. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a69dfe7fea7dac9513b79b9918bbf8050 `count(ValueOrIndexable const &)`]][Count Values or Indexables stored in the container. ]]
  100. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a4968c4543d315372b4c24fc4b571c3c5 `parameters()`]][Returns parameters. ]]
  101. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1abf1759583c5ae7284dbe53e904eec455 `indexable_get()`]][Returns function retrieving Indexable from Value. ]]
  102. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1ae7d1516455b9565fbddff04db202b223 `value_eq()`]][Returns function comparing Values. ]]
  103. [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a256cfca98dba150a63fd2023934dbd1a `get_allocator()`]][Returns allocator used by the rtree. ]]
  104. ]
  105. [#classboost_1_1geometry_1_1index_1_1rtree_1a55d5fd5d205df08db5267253689ccf0c]
  106. [section rtree()]
  107. '''<indexterm><primary>rtree</primary></indexterm>'''
  108. The constructor.
  109. [heading Synopsis]
  110. [pre
  111. `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]]`()``,`
  112. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,`
  113. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``)`
  114. ]
  115. [heading Modifier(s)]
  116. ``explicit ``[heading Parameter(s)]
  117. [table
  118. [[Type][Name][Description]]
  119. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
  120. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]]
  121. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values.]]
  122. ]
  123. [heading Throws]
  124. If allocator default constructor throws.
  125. [endsect]
  126. [#classboost_1_1geometry_1_1index_1_1rtree_1a1a6b696d4855cbf1866196fe058c3a87]
  127. [section rtree(parameters_type const &, indexable_getter const &, value_equal const &, allocator_type const &)]
  128. '''<indexterm><primary>rtree</primary></indexterm>'''
  129. The constructor.
  130. [heading Synopsis]
  131. [pre
  132. `rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters``,`
  133. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter``,`
  134. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal``,`
  135. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)`
  136. ]
  137. [heading Parameter(s)]
  138. [table
  139. [[Type][Name][Description]]
  140. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
  141. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]]
  142. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]]
  143. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]]
  144. ]
  145. [heading Throws]
  146. If allocator copy constructor throws.
  147. [endsect]
  148. [#classboost_1_1geometry_1_1index_1_1rtree_1a037f17d8a1dfa4a818ff471dec61c912]
  149. [section rtree(Iterator, Iterator)]
  150. '''<indexterm><primary>rtree</primary></indexterm>'''
  151. The constructor.
  152. [heading Description]
  153. The tree is created using packing algorithm.[heading Synopsis]
  154. [pre
  155. `template<``typename Iterator``>`
  156. `rtree``(``Iterator` `first``,`
  157. `Iterator` `last``,`
  158. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]`()``,`
  159. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,`
  160. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``,`
  161. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]`()``)`
  162. ]
  163. [heading Parameter(s)]
  164. [table
  165. [[Type][Name][Description]]
  166. [[`Iterator`][ `first` ][The beginning of the range of Values. ]]
  167. [[`Iterator`][ `last` ][The end of the range of Values. ]]
  168. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
  169. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]]
  170. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]]
  171. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]]
  172. ]
  173. [heading Throws]
  174. * If allocator copy constructor throws.
  175. * If Value copy constructor or copy assignment throws.
  176. * If allocation throws or returns invalid value.
  177. [endsect]
  178. [#classboost_1_1geometry_1_1index_1_1rtree_1a7b96b715c52ddc13d7a81db344825848]
  179. [section rtree(Range const &)]
  180. '''<indexterm><primary>rtree</primary></indexterm>'''
  181. The constructor.
  182. [heading Description]
  183. The tree is created using packing algorithm.[heading Synopsis]
  184. [pre
  185. `template<``typename Range``>`
  186. `rtree``(``Range const &` `rng``,`
  187. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &` `parameters` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]`()``,`
  188. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &` `getter` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]`()``,`
  189. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &` `equal` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]`()``,`
  190. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator` = [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]`()``)`
  191. ]
  192. [heading Modifier(s)]
  193. ``explicit ``[heading Parameter(s)]
  194. [table
  195. [[Type][Name][Description]]
  196. [[`Range const &`][ `rng` ][The range of Values. ]]
  197. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]]` const &`][ `parameters` ][The parameters object. ]]
  198. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]]` const &`][ `getter` ][The function object extracting Indexable from Value. ]]
  199. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]]` const &`][ `equal` ][The function object comparing Values. ]]
  200. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator object.]]
  201. ]
  202. [heading Throws]
  203. * If allocator copy constructor throws.
  204. * If Value copy constructor or copy assignment throws.
  205. * If allocation throws or returns invalid value.
  206. [endsect]
  207. [#classboost_1_1geometry_1_1index_1_1rtree_1af8db72811d2be53c409240204e63fb5a]
  208. [section ~rtree()]
  209. '''<indexterm><primary>~rtree</primary></indexterm>'''
  210. The destructor.
  211. [heading Synopsis]
  212. [pre
  213. `~rtree``()`
  214. ]
  215. [heading Throws]
  216. Nothing.
  217. [endsect]
  218. [#classboost_1_1geometry_1_1index_1_1rtree_1a826fc3236e181ad718d5283e95d7866f]
  219. [section rtree(rtree const &)]
  220. '''<indexterm><primary>rtree</primary></indexterm>'''
  221. The copy constructor.
  222. [heading Description]
  223. It uses parameters, translator and allocator from the source tree.[heading Synopsis]
  224. [pre
  225. `rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``)`
  226. ]
  227. [heading Parameter(s)]
  228. [table
  229. [[Type][Name][Description]]
  230. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied.]]
  231. ]
  232. [heading Throws]
  233. * If allocator copy constructor throws.
  234. * If Value copy constructor throws.
  235. * If allocation throws or returns invalid value.
  236. [endsect]
  237. [#classboost_1_1geometry_1_1index_1_1rtree_1a72b6b75e083eea2ed26f54d4a2265375]
  238. [section rtree(rtree const &, allocator_type const &)]
  239. '''<indexterm><primary>rtree</primary></indexterm>'''
  240. The copy constructor.
  241. [heading Description]
  242. It uses Parameters and translator from the source tree.[heading Synopsis]
  243. [pre
  244. `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``)`
  245. ]
  246. [heading Parameter(s)]
  247. [table
  248. [[Type][Name][Description]]
  249. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied. ]]
  250. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator which will be used.]]
  251. ]
  252. [heading Throws]
  253. * If allocator copy constructor throws.
  254. * If Value copy constructor throws.
  255. * If allocation throws or returns invalid value.
  256. [endsect]
  257. [#classboost_1_1geometry_1_1index_1_1rtree_1aa8b27db8cb783282ab5274e6769da26a]
  258. [section rtree(rtree &&)]
  259. '''<indexterm><primary>rtree</primary></indexterm>'''
  260. The moving constructor.
  261. [heading Description]
  262. It uses parameters, translator and allocator from the source tree.[heading Synopsis]
  263. [pre
  264. `rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)`
  265. ]
  266. [heading Parameter(s)]
  267. [table
  268. [[Type][Name][Description]]
  269. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]]
  270. ]
  271. [heading Throws]
  272. Nothing.
  273. [endsect]
  274. [#classboost_1_1geometry_1_1index_1_1rtree_1a8508c4236d17ff39a1caef058aac8486]
  275. [section rtree(rtree &&, allocator_type const &)]
  276. '''<indexterm><primary>rtree</primary></indexterm>'''
  277. The moving constructor.
  278. [heading Description]
  279. It uses parameters and translator from the source tree.[heading Synopsis]
  280. [pre
  281. `rtree``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &` `allocator``)`
  282. ]
  283. [heading Parameter(s)]
  284. [table
  285. [[Type][Name][Description]]
  286. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved. ]]
  287. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]]` const &`][ `allocator` ][The allocator.]]
  288. ]
  289. [heading Throws]
  290. * If allocator copy constructor throws.
  291. * If Value copy constructor throws (only if allocators aren't equal).
  292. * If allocation throws or returns invalid value (only if allocators aren't equal).
  293. [endsect]
  294. [#classboost_1_1geometry_1_1index_1_1rtree_1ad0db5e9e41e1553f944b7e740dbbb883]
  295. [section operator=(rtree const &)]
  296. '''<indexterm><primary>operator=</primary></indexterm>'''
  297. The assignment operator.
  298. [heading Description]
  299. It uses parameters and translator from the source tree.[heading Synopsis]
  300. [pre
  301. [^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &` `src``)`
  302. ]
  303. [heading Parameter(s)]
  304. [table
  305. [[Type][Name][Description]]
  306. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` const &`][ `src` ][The rtree which content will be copied.]]
  307. ]
  308. [heading Throws]
  309. * If Value copy constructor throws.
  310. * If allocation throws.
  311. * If allocation throws or returns invalid value.
  312. [endsect]
  313. [#classboost_1_1geometry_1_1index_1_1rtree_1af0bf9622ed3e901580b73ed39b746fb7]
  314. [section operator=(rtree &&)]
  315. '''<indexterm><primary>operator=</primary></indexterm>'''
  316. The moving assignment.
  317. [heading Description]
  318. It uses parameters and translator from the source tree.[heading Synopsis]
  319. [pre
  320. [^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `operator=``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&` `src``)`
  321. ]
  322. [heading Parameter(s)]
  323. [table
  324. [[Type][Name][Description]]
  325. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &&`][ `src` ][The rtree which content will be moved.]]
  326. ]
  327. [heading Throws]
  328. Only if allocators aren't equal.
  329. * If Value copy constructor throws.
  330. * If allocation throws or returns invalid value.
  331. [endsect]
  332. [#classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b]
  333. [section swap(rtree &)]
  334. '''<indexterm><primary>swap</primary></indexterm>'''
  335. Swaps contents of two rtrees.
  336. [heading Description]
  337. Parameters, translator and allocators are swapped as well.[heading Synopsis]
  338. [pre
  339. `void` `swap``(`[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &` `other``)`
  340. ]
  341. [heading Parameter(s)]
  342. [table
  343. [[Type][Name][Description]]
  344. [[[^[link classboost_1_1geometry_1_1index_1_1rtree rtree]]` &`][ `other` ][The rtree which content will be swapped with this rtree content.]]
  345. ]
  346. [heading Throws]
  347. If allocators swap throws.
  348. [endsect]
  349. [#classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86]
  350. [section insert(value_type const &)]
  351. '''<indexterm><primary>insert</primary></indexterm>'''
  352. Insert a value to the index.
  353. [heading Synopsis]
  354. [pre
  355. `void` `insert``(`[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &` `value``)`
  356. ]
  357. [heading Parameter(s)]
  358. [table
  359. [[Type][Name][Description]]
  360. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &`][ `value` ][The value which will be stored in the container.]]
  361. ]
  362. [heading Throws]
  363. * If Value copy constructor or copy assignment throws.
  364. * If allocation throws or returns invalid value.
  365. [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. ]
  366. [endsect]
  367. [#classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d]
  368. [section insert(Iterator, Iterator)]
  369. '''<indexterm><primary>insert</primary></indexterm>'''
  370. Insert a range of values to the index.
  371. [heading Synopsis]
  372. [pre
  373. `template<``typename Iterator``>`
  374. `void` `insert``(``Iterator` `first``,` `Iterator` `last``)`
  375. ]
  376. [heading Parameter(s)]
  377. [table
  378. [[Type][Name][Description]]
  379. [[`Iterator`][ `first` ][The beginning of the range of values. ]]
  380. [[`Iterator`][ `last` ][The end of the range of values.]]
  381. ]
  382. [heading Throws]
  383. * If Value copy constructor or copy assignment throws.
  384. * If allocation throws or returns invalid value.
  385. [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. ]
  386. [endsect]
  387. [#classboost_1_1geometry_1_1index_1_1rtree_1a5db294b14ebf1319edcfc92e78c8167e]
  388. [section insert(ConvertibleOrRange const &)]
  389. '''<indexterm><primary>insert</primary></indexterm>'''
  390. Insert a value created using convertible object or a range of values to the index.
  391. [heading Synopsis]
  392. [pre
  393. `template<``typename ConvertibleOrRange``>`
  394. `void` `insert``(``ConvertibleOrRange const &` `conv_or_rng``)`
  395. ]
  396. [heading Parameter(s)]
  397. [table
  398. [[Type][Name][Description]]
  399. [[`ConvertibleOrRange const &`][ `conv_or_rng` ][An object of type convertible to value_type or a range of values.]]
  400. ]
  401. [heading Throws]
  402. * If Value copy constructor or copy assignment throws.
  403. * If allocation throws or returns invalid value.
  404. [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. ]
  405. [endsect]
  406. [#classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4]
  407. [section remove(value_type const &)]
  408. '''<indexterm><primary>remove</primary></indexterm>'''
  409. Remove a value from the container.
  410. [heading Description]
  411. In contrast to the [^`std::set`] or [^`std::map erase()`] method this method removes only one value from the container.[heading Synopsis]
  412. [pre
  413. [^[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``)`
  414. ]
  415. [heading Parameter(s)]
  416. [table
  417. [[Type][Name][Description]]
  418. [[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5761a41d87b93d4fd548ecb6600ae757 value_type]]` const &`][ `value` ][The value which will be removed from the container.]]
  419. ]
  420. [heading Returns]
  421. 1 if the value was removed, 0 otherwise.
  422. [heading Throws]
  423. * If Value copy constructor or copy assignment throws.
  424. * If allocation throws or returns invalid value.
  425. [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. ]
  426. [endsect]
  427. [#classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa]
  428. [section remove(Iterator, Iterator)]
  429. '''<indexterm><primary>remove</primary></indexterm>'''
  430. Remove a range of values from the container.
  431. [heading Description]
  432. 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]
  433. [pre
  434. `template<``typename Iterator``>`
  435. [^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `remove``(``Iterator` `first``,` `Iterator` `last``)`
  436. ]
  437. [heading Parameter(s)]
  438. [table
  439. [[Type][Name][Description]]
  440. [[`Iterator`][ `first` ][The beginning of the range of values. ]]
  441. [[`Iterator`][ `last` ][The end of the range of values.]]
  442. ]
  443. [heading Returns]
  444. The number of removed values.
  445. [heading Throws]
  446. * If Value copy constructor or copy assignment throws.
  447. * If allocation throws or returns invalid value.
  448. [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. ]
  449. [endsect]
  450. [#classboost_1_1geometry_1_1index_1_1rtree_1a320cd1861ba7b43364ed53e1f93a4411]
  451. [section remove(ConvertibleOrRange const &)]
  452. '''<indexterm><primary>remove</primary></indexterm>'''
  453. Remove value corresponding to an object convertible to it or a range of values from the container.
  454. [heading Description]
  455. 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]
  456. [pre
  457. `template<``typename ConvertibleOrRange``>`
  458. [^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `remove``(``ConvertibleOrRange const &` `conv_or_rng``)`
  459. ]
  460. [heading Parameter(s)]
  461. [table
  462. [[Type][Name][Description]]
  463. [[`ConvertibleOrRange const &`][ `conv_or_rng` ][The object of type convertible to value_type or a range of values.]]
  464. ]
  465. [heading Returns]
  466. The number of removed values.
  467. [heading Throws]
  468. * If Value copy constructor or copy assignment throws.
  469. * If allocation throws or returns invalid value.
  470. [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. ]
  471. [endsect]
  472. [#classboost_1_1geometry_1_1index_1_1rtree_1ace0ba7f3280b1074cea31b4f1bc1d7ea]
  473. [section query(Predicates const &, OutIter)]
  474. '''<indexterm><primary>query</primary></indexterm>'''
  475. Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
  476. [heading Description]
  477. 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.
  478. [*Spatial predicates]
  479. Spatial predicates may be generated by one of the functions listed below:
  480. * [^[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]],
  481. * [^[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]],
  482. * [^[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]],
  483. * [^[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]],
  484. * [^[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]],
  485. * [^[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]],
  486. * [^[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]],
  487. It is possible to negate spatial predicates:
  488. * [^`! `[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 boost::geometry::index::contains()]],
  489. * [^`! `[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 boost::geometry::index::covered_by()]],
  490. * [^`! `[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 boost::geometry::index::covers()]],
  491. * [^`! `[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da boost::geometry::index::disjoint()]],
  492. * [^`! `[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 boost::geometry::index::intersects()]],
  493. * [^`! `[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b boost::geometry::index::overlaps()]],
  494. * [^`! `[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 boost::geometry::index::within()]]
  495. [*Satisfies predicate]
  496. 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:
  497. * [^[link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c boost::geometry::index::satisfies()]].
  498. [*Nearest predicate]
  499. 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:
  500. * [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e boost::geometry::index::nearest()]].
  501. [*Connecting predicates]
  502. Predicates may be passed together connected with [^`operator&&()`].[heading Synopsis]
  503. [pre
  504. `template<``typename Predicates``,` `typename OutIter``>`
  505. [^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `query``(``Predicates const &` `predicates``,` `OutIter` `out_it``)`
  506. ]
  507. [heading Modifier(s)]
  508. ``const ``[heading Parameter(s)]
  509. [table
  510. [[Type][Name][Description]]
  511. [[`Predicates const &`][ `predicates` ][Predicates. ]]
  512. [[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]]
  513. ]
  514. [heading Returns]
  515. The number of values found.
  516. [heading Example]
  517. ``
  518. // return elements intersecting box
  519. tree.query(bgi::intersects(box), std::back_inserter(result));
  520. // return elements intersecting poly but not within box
  521. tree.query(bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
  522. // return elements overlapping box and meeting my_fun unary predicate
  523. tree.query(bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result));
  524. // return 5 elements nearest to pt and elements are intersecting box
  525. tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
  526. // For each found value do_something (it is a type of function object)
  527. tree.query(bgi::intersects(box),
  528. boost::make_function_output_iterator(do_something()));
  529. // For each value stored in the rtree do_something
  530. // always_true is a type of function object always returning true
  531. tree.query(bgi::satisfies(always_true()),
  532. boost::make_function_output_iterator(do_something()));
  533. // C++11 (lambda expression)
  534. tree.query(bgi::intersects(box),
  535. boost::make_function_output_iterator([](value_type const& val){
  536. // do something
  537. }));
  538. // C++14 (generic lambda expression)
  539. tree.query(bgi::intersects(box),
  540. boost::make_function_output_iterator([](auto const& val){
  541. // do something
  542. }));
  543. ``
  544. [heading Throws]
  545. If Value copy constructor or copy assignment throws. If predicates copy throws.
  546. [warning Only one [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()]] predicate may be passed to the query. Passing more of them results in compile-time error.]
  547. [endsect]
  548. [#classboost_1_1geometry_1_1index_1_1rtree_1a874f43d4119f552a613f051c6177b9d8]
  549. [section qbegin(Predicates const &)]
  550. '''<indexterm><primary>qbegin</primary></indexterm>'''
  551. Returns a query iterator pointing at the begin of the query range.
  552. [heading Description]
  553. This 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]
  554. [pre
  555. `template<``typename Predicates``>`
  556. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855 const_query_iterator]] `qbegin``(``Predicates const &` `predicates``)`
  557. ]
  558. [heading Modifier(s)]
  559. ``const ``[heading Parameter(s)]
  560. [table
  561. [[Type][Name][Description]]
  562. [[`Predicates const &`][ `predicates` ][Predicates.]]
  563. ]
  564. [heading Returns]
  565. The iterator pointing at the begin of the query range.
  566. [heading Example]
  567. ``
  568. for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ;
  569. it != tree.qend() ; ++it )
  570. {
  571. // do something with value
  572. if ( has_enough_nearest_values() )
  573. break;
  574. }
  575. // C++11 (auto)
  576. for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it )
  577. {
  578. // do something with value
  579. }
  580. // C++14 (generic lambda expression)
  581. std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){
  582. // do something with value
  583. });
  584. ``
  585. [heading Iterator category]
  586. ForwardIterator
  587. [heading Throws]
  588. If predicates copy throws. If allocation throws.
  589. [warning The modification of the rtree may invalidate the iterators.]
  590. [endsect]
  591. [#classboost_1_1geometry_1_1index_1_1rtree_1a4950060dcd8647acbddfbeb38d453253]
  592. [section qend()]
  593. '''<indexterm><primary>qend</primary></indexterm>'''
  594. Returns a query iterator pointing at the end of the query range.
  595. [heading Description]
  596. This method returns an iterator which may be used to check if the query has ended.[heading Synopsis]
  597. [pre
  598. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad144a7704ad878caaa84cda79b140855 const_query_iterator]] `qend``()`
  599. ]
  600. [heading Modifier(s)]
  601. ``const ``[heading Returns]
  602. The iterator pointing at the end of the query range.
  603. [heading Example]
  604. ``
  605. for ( Rtree::const_query_iterator it = tree.qbegin(bgi::nearest(pt, 10000)) ;
  606. it != tree.qend() ; ++it )
  607. {
  608. // do something with value
  609. if ( has_enough_nearest_values() )
  610. break;
  611. }
  612. // C++11 (auto)
  613. for ( auto it = tree.qbegin(bgi::nearest(pt, 3)) ; it != tree.qend() ; ++it )
  614. {
  615. // do something with value
  616. }
  617. // C++14 (generic lambda expression)
  618. std::for_each(tree.qbegin(bgi::nearest(pt, 3)), tree.qend(), [](auto const& val){
  619. // do something with value
  620. });
  621. ``
  622. [heading Iterator category]
  623. ForwardIterator
  624. [heading Throws]
  625. Nothing
  626. [warning The modification of the rtree may invalidate the iterators.]
  627. [endsect]
  628. [#classboost_1_1geometry_1_1index_1_1rtree_1a4efdce77c31a940642d824f3cabe2d31]
  629. [section begin()]
  630. '''<indexterm><primary>begin</primary></indexterm>'''
  631. Returns the iterator pointing at the begin of the rtree values range.
  632. [heading Description]
  633. This method returns the iterator which may be used to iterate over all values stored in the rtree.[heading Synopsis]
  634. [pre
  635. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde const_iterator]] `begin``()`
  636. ]
  637. [heading Modifier(s)]
  638. ``const ``[heading Returns]
  639. The iterator pointing at the begin of the range.
  640. [heading Example]
  641. ``
  642. // Copy all values into the vector
  643. std::copy(tree.begin(), tree.end(), std::back_inserter(vec));
  644. for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it )
  645. {
  646. // do something with value
  647. }
  648. // C++11 (auto)
  649. for ( auto it = tree.begin() ; it != tree.end() ; ++it )
  650. {
  651. // do something with value
  652. }
  653. // C++14 (generic lambda expression)
  654. std::for_each(tree.begin(), tree.end(), [](auto const& val){
  655. // do something with value
  656. })
  657. ``
  658. [heading Iterator category]
  659. ForwardIterator
  660. [heading Throws]
  661. If allocation throws.
  662. [warning The modification of the rtree may invalidate the iterators.]
  663. [endsect]
  664. [#classboost_1_1geometry_1_1index_1_1rtree_1a5c8b735055ac44dd1d354359c5a0b910]
  665. [section end()]
  666. '''<indexterm><primary>end</primary></indexterm>'''
  667. Returns the iterator pointing at the end of the rtree values range.
  668. [heading Description]
  669. This 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]
  670. [pre
  671. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a701f65f0d6cf2e8b7be7f1c4b8fb7fde const_iterator]] `end``()`
  672. ]
  673. [heading Modifier(s)]
  674. ``const ``[heading Returns]
  675. The iterator pointing at the end of the range.
  676. [heading Example]
  677. ``
  678. for ( Rtree::const_iterator it = tree.begin() ; it != tree.end() ; ++it )
  679. {
  680. // do something with value
  681. }
  682. // C++11 (lambda expression)
  683. std::for_each(tree.begin(), tree.end(), [](value_type const& val){
  684. // do something with value
  685. })
  686. ``
  687. [heading Iterator category]
  688. ForwardIterator
  689. [heading Throws]
  690. Nothing.
  691. [warning The modification of the rtree may invalidate the iterators.]
  692. [endsect]
  693. [#classboost_1_1geometry_1_1index_1_1rtree_1a7a7bfa3ce751e0c357c36e1bb238c523]
  694. [section size()]
  695. '''<indexterm><primary>size</primary></indexterm>'''
  696. Returns the number of stored values.
  697. [heading Synopsis]
  698. [pre
  699. [^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `size``()`
  700. ]
  701. [heading Modifier(s)]
  702. ``const ``[heading Returns]
  703. The number of stored values.
  704. [heading Throws]
  705. Nothing.
  706. [endsect]
  707. [#classboost_1_1geometry_1_1index_1_1rtree_1a18bed92ff302df192215c3809fe5272e]
  708. [section empty()]
  709. '''<indexterm><primary>empty</primary></indexterm>'''
  710. Query if the container is empty.
  711. [heading Synopsis]
  712. [pre
  713. `bool` `empty``()`
  714. ]
  715. [heading Modifier(s)]
  716. ``const ``[heading Returns]
  717. true if the container is empty.
  718. [heading Throws]
  719. Nothing.
  720. [endsect]
  721. [#classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c]
  722. [section clear()]
  723. '''<indexterm><primary>clear</primary></indexterm>'''
  724. Removes all values stored in the container.
  725. [heading Synopsis]
  726. [pre
  727. `void` `clear``()`
  728. ]
  729. [heading Throws]
  730. Nothing.
  731. [endsect]
  732. [#classboost_1_1geometry_1_1index_1_1rtree_1a2f244b24b24711dc39019198151dc2db]
  733. [section bounds()]
  734. '''<indexterm><primary>bounds</primary></indexterm>'''
  735. Returns the box able to contain all values stored in the container.
  736. [heading Description]
  737. 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]
  738. [pre
  739. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a12e80f9da4c68e0e687f1c2012321147 bounds_type]] `bounds``()`
  740. ]
  741. [heading Modifier(s)]
  742. ``const ``[heading Returns]
  743. The box able to contain all values stored in the container or an invalid box if there are no values in the container.
  744. [heading Throws]
  745. Nothing.
  746. [endsect]
  747. [#classboost_1_1geometry_1_1index_1_1rtree_1a69dfe7fea7dac9513b79b9918bbf8050]
  748. [section count(ValueOrIndexable const &)]
  749. '''<indexterm><primary>count</primary></indexterm>'''
  750. Count Values or Indexables stored in the container.
  751. [heading Description]
  752. 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]
  753. [pre
  754. `template<``typename ValueOrIndexable``>`
  755. [^[link classboost_1_1geometry_1_1index_1_1rtree_1acc1f90d7b70afebc58107c523ece5cd5 size_type]] `count``(``ValueOrIndexable const &` `vori``)`
  756. ]
  757. [heading Modifier(s)]
  758. ``const ``[heading Parameter(s)]
  759. [table
  760. [[Type][Name][Description]]
  761. [[`ValueOrIndexable const &`][ `vori` ][The value or indexable which will be counted.]]
  762. ]
  763. [heading Returns]
  764. The number of values found.
  765. [heading Throws]
  766. Nothing.
  767. [endsect]
  768. [#classboost_1_1geometry_1_1index_1_1rtree_1a4968c4543d315372b4c24fc4b571c3c5]
  769. [section parameters()]
  770. '''<indexterm><primary>parameters</primary></indexterm>'''
  771. Returns parameters.
  772. [heading Synopsis]
  773. [pre
  774. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a80db5532eb59f7a809bd44ded265eb17 parameters_type]] `parameters``()`
  775. ]
  776. [heading Modifier(s)]
  777. ``const ``[heading Returns]
  778. The parameters object.
  779. [heading Throws]
  780. Nothing.
  781. [endsect]
  782. [#classboost_1_1geometry_1_1index_1_1rtree_1abf1759583c5ae7284dbe53e904eec455]
  783. [section indexable_get()]
  784. '''<indexterm><primary>indexable_get</primary></indexterm>'''
  785. Returns function retrieving Indexable from Value.
  786. [heading Synopsis]
  787. [pre
  788. [^[link classboost_1_1geometry_1_1index_1_1rtree_1a43a7adb311cafc08e23010ccb4e97fb5 indexable_getter]] `indexable_get``()`
  789. ]
  790. [heading Modifier(s)]
  791. ``const ``[heading Returns]
  792. The indexable_getter object.
  793. [heading Throws]
  794. Nothing.
  795. [endsect]
  796. [#classboost_1_1geometry_1_1index_1_1rtree_1ae7d1516455b9565fbddff04db202b223]
  797. [section value_eq()]
  798. '''<indexterm><primary>value_eq</primary></indexterm>'''
  799. Returns function comparing Values.
  800. [heading Synopsis]
  801. [pre
  802. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad8fe544de514014a1bd87ea1b881ff9b value_equal]] `value_eq``()`
  803. ]
  804. [heading Modifier(s)]
  805. ``const ``[heading Returns]
  806. The value_equal function.
  807. [heading Throws]
  808. Nothing.
  809. [endsect]
  810. [#classboost_1_1geometry_1_1index_1_1rtree_1a256cfca98dba150a63fd2023934dbd1a]
  811. [section get_allocator()]
  812. '''<indexterm><primary>get_allocator</primary></indexterm>'''
  813. Returns allocator used by the rtree.
  814. [heading Synopsis]
  815. [pre
  816. [^[link classboost_1_1geometry_1_1index_1_1rtree_1ab6618b5c7e88ed70533233fbac0f5b2e allocator_type]] `get_allocator``()`
  817. ]
  818. [heading Modifier(s)]
  819. ``const ``[heading Returns]
  820. The allocator.
  821. [heading Throws]
  822. If allocator copy constructor throws.
  823. [endsect]
  824. [endsect]