• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>strategy::distance::pythagoras_point_box</title>
5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../../index.html" title="Chapter 1. Geometry">
8<link rel="up" href="../strategies.html" title="Strategies">
9<link rel="prev" href="strategy_distance_pythagoras_box_box.html" title="strategy::distance::pythagoras_box_box">
10<link rel="next" href="strategy_distance_haversine.html" title="strategy::distance::haversine">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="strategy_distance_pythagoras_box_box.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../strategies.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="strategy_distance_haversine.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box"></a><a class="link" href="strategy_distance_pythagoras_point_box.html" title="strategy::distance::pythagoras_point_box">strategy::distance::pythagoras_point_box</a>
28</h4></div></div></div>
29<p>
30          <a class="indexterm" name="idm45635669099520"></a><a class="indexterm" name="idm45635669098832"></a><a class="indexterm" name="idm45635669098144"></a>
31Strategy to calculate the distance between a point and a box.
32        </p>
33<h6>
34<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h0"></a>
35          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.synopsis"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.synopsis">Synopsis</a>
36        </h6>
37<p>
38</p>
39<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">CalculationType</span><span class="special">&gt;</span>
40<span class="keyword">class</span> <span class="identifier">strategy</span><span class="special">::</span><span class="identifier">distance</span><span class="special">::</span><span class="identifier">pythagoras_point_box</span>
41<span class="special">{</span>
42  <span class="comment">// ...</span>
43<span class="special">};</span>
44</pre>
45<p>
46        </p>
47<h6>
48<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h1"></a>
49          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.template_parameter_s_"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.template_parameter_s_">Template
50          parameter(s)</a>
51        </h6>
52<div class="informaltable"><table class="table">
53<colgroup>
54<col>
55<col>
56<col>
57</colgroup>
58<thead><tr>
59<th>
60                  <p>
61                    Parameter
62                  </p>
63                </th>
64<th>
65                  <p>
66                    Default
67                  </p>
68                </th>
69<th>
70                  <p>
71                    Description
72                  </p>
73                </th>
74</tr></thead>
75<tbody><tr>
76<td>
77                  <p>
78                    typename CalculationType
79                  </p>
80                </td>
81<td>
82                  <p>
83                    void
84                  </p>
85                </td>
86<td>
87                  <p>
88                    numeric type for calculation (e.g. high precision); if <span class="bold"><strong>void</strong></span> then it is extracted automatically
89                    from the coordinate type and (if necessary) promoted to floating
90                    point
91                  </p>
92                </td>
93</tr></tbody>
94</table></div>
95<h6>
96<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h2"></a>
97          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.member_function_s_"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.member_function_s_">Member
98          Function(s)</a>
99        </h6>
100<div class="informaltable"><table class="table">
101<colgroup>
102<col>
103<col>
104<col>
105<col>
106</colgroup>
107<thead><tr>
108<th>
109                  <p>
110                    Function
111                  </p>
112                </th>
113<th>
114                  <p>
115                    Description
116                  </p>
117                </th>
118<th>
119                  <p>
120                    Parameters
121                  </p>
122                </th>
123<th>
124                  <p>
125                    Returns
126                  </p>
127                </th>
128</tr></thead>
129<tbody><tr>
130<td>
131                  <p>
132</p>
133<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Point</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Box</span><span class="special">&gt;</span>
134<span class="identifier">calculation_type</span><span class="special">&lt;</span> <span class="identifier">Point</span><span class="special">,</span> <span class="identifier">Box</span> <span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">Point</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">point</span><span class="special">,</span> <span class="identifier">Box</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">box</span><span class="special">)</span></pre>
135<p>
136                  </p>
137                </td>
138<td>
139                  <p>
140                    applies the distance calculation using pythagoras
141                  </p>
142                </td>
143<td>
144                  <p>
145                    <span class="bold"><strong>Point const &amp;</strong></span>: <span class="emphasis"><em>point</em></span>:
146                    point
147                  </p>
148                  <p>
149                    <span class="bold"><strong>Box const &amp;</strong></span>: <span class="emphasis"><em>box</em></span>:
150                    box
151                  </p>
152                </td>
153<td>
154                  <p>
155                    the calculated distance (including taking the square root)
156                  </p>
157                </td>
158</tr></tbody>
159</table></div>
160<h6>
161<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h3"></a>
162          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.header"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.header">Header</a>
163        </h6>
164<p>
165          <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">strategies</span><span class="special">/</span><span class="identifier">cartesian</span><span class="special">/</span><span class="identifier">distance_pythagoras_point_box</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
166        </p>
167<h6>
168<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h4"></a>
169          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.notes"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.notes">Notes</a>
170        </h6>
171<div class="note"><table border="0" summary="Note">
172<tr>
173<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../doc/src/images/note.png"></td>
174<th align="left">Note</th>
175</tr>
176<tr><td align="left" valign="top"><p>
177            Can be used for points and boxes with two, three or more dimensions
178          </p></td></tr>
179</table></div>
180<h6>
181<a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.h5"></a>
182          <span class="phrase"><a name="geometry.reference.strategies.strategy_distance_pythagoras_point_box.see_also"></a></span><a class="link" href="strategy_distance_pythagoras_point_box.html#geometry.reference.strategies.strategy_distance_pythagoras_point_box.see_also">See
183          also</a>
184        </h6>
185<p>
186          <a class="link" href="../algorithms/distance/distance_3_with_strategy.html" title="distance (with strategy)">distance
187          (with strategy)</a>
188        </p>
189</div>
190<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
191<td align="left"></td>
192<td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
193      Wulkiewicz, Oracle and/or its affiliates<p>
194        Distributed under the Boost Software License, Version 1.0. (See accompanying
195        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
196      </p>
197</div></td>
198</tr></table>
199<hr>
200<div class="spirit-nav">
201<a accesskey="p" href="strategy_distance_pythagoras_box_box.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../strategies.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="strategy_distance_haversine.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
202</div>
203</body>
204</html>
205