arithmetic.qbk 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. [/============================================================================
  2. Boost.Geometry (aka GGL, Generic Geometry Library)
  3. Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
  4. Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
  5. Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
  6. Use, modification and distribution is subject to the Boost Software License,
  7. Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. http://www.boost.org/LICENSE_1_0.txt)
  9. =============================================================================/]
  10. [/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
  11. [/ Generated from doxy/doxygen_output/xml/group__arithmetic.xml]
  12. [section:add_point add_point]
  13. '''<indexterm><primary>add_point</primary></indexterm>'''
  14. Adds a point to another.
  15. [heading Description]
  16. The coordinates of the second point will be added to those of the first point. The second point is not modified.
  17. [heading Synopsis]
  18. ``template<typename Point1, typename Point2>
  19. void add_point(Point1 & p1, Point2 const & p2)``
  20. [heading Parameters]
  21. [table
  22. [[Type] [Concept] [Name] [Description] ]
  23. [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  24. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  25. ]
  26. [heading Header]
  27. Either
  28. `#include <boost/geometry.hpp>`
  29. Or
  30. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  31. [endsect]
  32. [section:add_value add_value]
  33. '''<indexterm><primary>add_value</primary></indexterm>'''
  34. Adds the same value to each coordinate of a point.
  35. [heading Synopsis]
  36. ``template<typename Point>
  37. void add_value(Point & p, typename detail::param< Point >::type value)``
  38. [heading Parameters]
  39. [table
  40. [[Type] [Concept] [Name] [Description] ]
  41. [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
  42. [[typename detail::param< Point >::type] [] [value] [value to add ]]
  43. ]
  44. [heading Header]
  45. Either
  46. `#include <boost/geometry.hpp>`
  47. Or
  48. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  49. [endsect]
  50. [section:assign_point assign_point]
  51. '''<indexterm><primary>assign_point</primary></indexterm>'''
  52. Assign a point with another.
  53. [heading Description]
  54. The coordinates of the first point will be assigned those of the second point. The second point is not modified.
  55. [heading Synopsis]
  56. ``template<typename Point1, typename Point2>
  57. void assign_point(Point1 & p1, Point2 const & p2)``
  58. [heading Parameters]
  59. [table
  60. [[Type] [Concept] [Name] [Description] ]
  61. [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  62. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  63. ]
  64. [heading Header]
  65. Either
  66. `#include <boost/geometry.hpp>`
  67. Or
  68. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  69. [endsect]
  70. [section:assign_value assign_value]
  71. '''<indexterm><primary>assign_value</primary></indexterm>'''
  72. Assign each coordinate of a point the same value.
  73. [heading Synopsis]
  74. ``template<typename Point>
  75. void assign_value(Point & p, typename detail::param< Point >::type value)``
  76. [heading Parameters]
  77. [table
  78. [[Type] [Concept] [Name] [Description] ]
  79. [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
  80. [[typename detail::param< Point >::type] [] [value] [value to assign ]]
  81. ]
  82. [heading Header]
  83. Either
  84. `#include <boost/geometry.hpp>`
  85. Or
  86. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  87. [endsect]
  88. [section:cross_product_2 cross_product]
  89. '''<indexterm><primary>cross_product</primary></indexterm>'''
  90. Computes the cross product of two vectors.
  91. [heading Description]
  92. All vectors should have the same dimension, 3 or 2.
  93. [heading Synopsis]
  94. ``template<typename ResultP, typename P1, typename P2>
  95. ResultP cross_product(P1 const & p1, P2 const & p2)``
  96. [heading Parameters]
  97. [table
  98. [[Type] [Concept] [Name] [Description] ]
  99. [[ResultP] [] [ - ] [Must be specified]]
  100. [[P1 const &] [] [p1] [first vector ]]
  101. [[P2 const &] [] [p2] [second vector ]]
  102. ]
  103. [heading Returns]
  104. the cross product vector
  105. [heading Header]
  106. `#include <boost/geometry/arithmetic/cross_product.hpp>`
  107. [endsect]
  108. [section:cross_product_2 cross_product]
  109. '''<indexterm><primary>cross_product</primary></indexterm>'''
  110. Computes the cross product of two vectors.
  111. [heading Description]
  112. All vectors should have the same dimension, 3 or 2.
  113. [heading Synopsis]
  114. ``template<typename P>
  115. P cross_product(P const & p1, P const & p2)``
  116. [heading Parameters]
  117. [table
  118. [[Type] [Concept] [Name] [Description] ]
  119. [[P const &] [] [p1] [first vector ]]
  120. [[P const &] [] [p2] [second vector ]]
  121. ]
  122. [heading Returns]
  123. the cross product vector
  124. [heading Header]
  125. `#include <boost/geometry/arithmetic/cross_product.hpp>`
  126. [endsect]
  127. [section:divide_point divide_point]
  128. '''<indexterm><primary>divide_point</primary></indexterm>'''
  129. Divides a point by another.
  130. [heading Description]
  131. The coordinates of the first point will be divided by those of the second point. The second point is not modified.
  132. [heading Synopsis]
  133. ``template<typename Point1, typename Point2>
  134. void divide_point(Point1 & p1, Point2 const & p2)``
  135. [heading Parameters]
  136. [table
  137. [[Type] [Concept] [Name] [Description] ]
  138. [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  139. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  140. ]
  141. [heading Header]
  142. Either
  143. `#include <boost/geometry.hpp>`
  144. Or
  145. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  146. [endsect]
  147. [section:divide_value divide_value]
  148. '''<indexterm><primary>divide_value</primary></indexterm>'''
  149. Divides each coordinate of the same point by a value.
  150. [heading Synopsis]
  151. ``template<typename Point>
  152. void divide_value(Point & p, typename detail::param< Point >::type value)``
  153. [heading Parameters]
  154. [table
  155. [[Type] [Concept] [Name] [Description] ]
  156. [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
  157. [[typename detail::param< Point >::type] [] [value] [value to divide by ]]
  158. ]
  159. [heading Header]
  160. Either
  161. `#include <boost/geometry.hpp>`
  162. Or
  163. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  164. [endsect]
  165. [section:dot_product dot_product]
  166. '''<indexterm><primary>dot_product</primary></indexterm>'''
  167. Computes the dot product (or scalar product) of 2 vectors (points).
  168. [heading Synopsis]
  169. ``template<typename Point1, typename Point2>
  170. select_coordinate_type<Point1, Point2>::type dot_product(Point1 const & p1, Point2 const & p2)``
  171. [heading Parameters]
  172. [table
  173. [[Type] [Concept] [Name] [Description] ]
  174. [[Point1 const &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  175. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  176. ]
  177. [heading Returns]
  178. the dot product
  179. [heading Header]
  180. Either
  181. `#include <boost/geometry.hpp>`
  182. Or
  183. `#include <boost/geometry/arithmetic/dot_product.hpp>`
  184. [endsect]
  185. [section:multiply_point multiply_point]
  186. '''<indexterm><primary>multiply_point</primary></indexterm>'''
  187. Multiplies a point by another.
  188. [heading Description]
  189. The coordinates of the first point will be multiplied by those of the second point. The second point is not modified.
  190. [heading Synopsis]
  191. ``template<typename Point1, typename Point2>
  192. void multiply_point(Point1 & p1, Point2 const & p2)``
  193. [heading Parameters]
  194. [table
  195. [[Type] [Concept] [Name] [Description] ]
  196. [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  197. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  198. ]
  199. [heading Header]
  200. Either
  201. `#include <boost/geometry.hpp>`
  202. Or
  203. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  204. [endsect]
  205. [section:multiply_value multiply_value]
  206. '''<indexterm><primary>multiply_value</primary></indexterm>'''
  207. Multiplies each coordinate of a point by the same value.
  208. [heading Synopsis]
  209. ``template<typename Point>
  210. void multiply_value(Point & p, typename detail::param< Point >::type value)``
  211. [heading Parameters]
  212. [table
  213. [[Type] [Concept] [Name] [Description] ]
  214. [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
  215. [[typename detail::param< Point >::type] [] [value] [value to multiply by ]]
  216. ]
  217. [heading Header]
  218. Either
  219. `#include <boost/geometry.hpp>`
  220. Or
  221. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  222. [endsect]
  223. [section:subtract_point subtract_point]
  224. '''<indexterm><primary>subtract_point</primary></indexterm>'''
  225. Subtracts a point to another.
  226. [heading Description]
  227. The coordinates of the second point will be subtracted to those of the first point. The second point is not modified.
  228. [heading Synopsis]
  229. ``template<typename Point1, typename Point2>
  230. void subtract_point(Point1 & p1, Point2 const & p2)``
  231. [heading Parameters]
  232. [table
  233. [[Type] [Concept] [Name] [Description] ]
  234. [[Point1 &] [Any type fulfilling a Point Concept ] [p1] [first point ]]
  235. [[Point2 const &] [Any type fulfilling a Point Concept ] [p2] [second point ]]
  236. ]
  237. [heading Header]
  238. Either
  239. `#include <boost/geometry.hpp>`
  240. Or
  241. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  242. [endsect]
  243. [section:subtract_value subtract_value]
  244. '''<indexterm><primary>subtract_value</primary></indexterm>'''
  245. Subtracts the same value to each coordinate of a point.
  246. [heading Synopsis]
  247. ``template<typename Point>
  248. void subtract_value(Point & p, typename detail::param< Point >::type value)``
  249. [heading Parameters]
  250. [table
  251. [[Type] [Concept] [Name] [Description] ]
  252. [[Point &] [Any type fulfilling a Point Concept ] [p] [point ]]
  253. [[typename detail::param< Point >::type] [] [value] [value to subtract ]]
  254. ]
  255. [heading Header]
  256. Either
  257. `#include <boost/geometry.hpp>`
  258. Or
  259. `#include <boost/geometry/arithmetic/arithmetic.hpp>`
  260. [endsect]