3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>comparable_distance (with strategy)</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="../distance.html" title="distance">
9 <link rel="prev" href="../distance.html" title="distance">
10 <link rel="next" href="comparable_distance_2.html" title="comparable_distance">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../distance.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../distance.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="comparable_distance_2.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy"></a><a class="link" href="comparable_distance_3_with_strategy.html" title="comparable_distance (with strategy)">comparable_distance
29 </h5></div></div></div>
31 <a class="indexterm" name="idp94569232"></a>
32 Calculate the comparable distance measurement of two geometries using
33 the specified strategy.
36 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.h0"></a>
37 <span class="phrase"><a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.description"></a></span><a class="link" href="comparable_distance_3_with_strategy.html#geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.description">Description</a>
40 The free function comparable_distance does not necessarily calculate
41 the distance, but it calculates a distance measure such that two distances
42 are comparable to each other. For example: for the Cartesian coordinate
43 system, Pythagoras is used but the square root is not taken, which makes
44 it faster and the results of two point pairs can still be compared to
48 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.h1"></a>
49 <span class="phrase"><a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.synopsis"></a></span><a class="link" href="comparable_distance_3_with_strategy.html#geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.synopsis">Synopsis</a>
53 <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Geometry1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Geometry2</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Strategy</span><span class="special">></span>
54 <span class="identifier">comparable_distance_result</span><span class="special"><</span><span class="identifier">Geometry1</span><span class="special">,</span> <span class="identifier">Geometry2</span><span class="special">,</span> <span class="identifier">Strategy</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">comparable_distance</span><span class="special">(</span><span class="identifier">Geometry1</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">geometry1</span><span class="special">,</span> <span class="identifier">Geometry2</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">geometry2</span><span class="special">,</span> <span class="identifier">Strategy</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">strategy</span><span class="special">)</span></pre>
58 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.h2"></a>
59 <span class="phrase"><a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.parameters"></a></span><a class="link" href="comparable_distance_3_with_strategy.html#geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.parameters">Parameters</a>
61 <div class="informaltable"><table class="table">
109 A model of the specified concept
116 Geometry2 const &
131 A model of the specified concept
143 Any type fulfilling a Distance Strategy Concept
153 The strategy which will be used for distance calculations
160 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.h3"></a>
161 <span class="phrase"><a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.returns"></a></span><a class="link" href="comparable_distance_3_with_strategy.html#geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.returns">Returns</a>
164 The calculated comparable distance
167 <a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.h4"></a>
168 <span class="phrase"><a name="geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.header"></a></span><a class="link" href="comparable_distance_3_with_strategy.html#geometry.reference.algorithms.distance.comparable_distance_3_with_strategy.header">Header</a>
174 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
180 <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">geometry</span><span class="special">/</span><span class="identifier">algorithms</span><span class="special">/</span><span class="identifier">comparable_distance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
183 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
184 <td align="left"></td>
185 <td align="right"><div class="copyright-footer">Copyright © 2009-2017 Barend
186 Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its
188 Distributed under the Boost Software License, Version 1.0. (See accompanying
189 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>)
194 <div class="spirit-nav">
195 <a accesskey="p" href="../distance.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../distance.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="comparable_distance_2.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>