3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>strategy::centroid::bashein_detmer</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_centroid_average.html" title="strategy::centroid::average">
10 <link rel="next" href="strategy_convex_hull_graham_andrew.html" title="strategy::convex_hull::graham_andrew">
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="strategy_centroid_average.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_convex_hull_graham_andrew.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer"></a><a class="link" href="strategy_centroid_bashein_detmer.html" title="strategy::centroid::bashein_detmer">strategy::centroid::bashein_detmer</a>
28 </h4></div></div></div>
30 <a class="indexterm" name="idm46186973540336"></a><a class="indexterm" name="idm46186973539648"></a><a class="indexterm" name="idm46186973538960"></a>
31 Centroid calculation using algorithm Bashein / Detmer.
34 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h0"></a>
35 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.description"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.description">Description</a>
38 Calculates centroid using triangulation method published by Bashein / Detmer
41 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h1"></a>
42 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.synopsis"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.synopsis">Synopsis</a>
46 <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Point</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">PointOfSegment</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">CalculationType</span><span class="special">></span>
47 <span class="keyword">class</span> <span class="identifier">strategy</span><span class="special">::</span><span class="identifier">centroid</span><span class="special">::</span><span class="identifier">bashein_detmer</span>
48 <span class="special">{</span>
49 <span class="comment">// ...</span>
50 <span class="special">};</span>
55 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h2"></a>
56 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.template_parameter_s_"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.template_parameter_s_">Template
59 <div class="informaltable"><table class="table">
93 point type of centroid to calculate
100 typename PointOfSegment
110 point type of segments, defaults to Point
117 typename CalculationType
127 numeric type for calculation (e.g. high precision); if <span class="bold"><strong>void</strong></span> then it is extracted automatically
128 from the coordinate type and (if necessary) promoted to floating
136 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h3"></a>
137 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.member_function_s_"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.member_function_s_">Member
140 <div class="informaltable"><table class="table">
174 <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">apply</span><span class="special">(</span><span class="identifier">PointOfSegment</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">p1</span><span class="special">,</span> <span class="identifier">PointOfSegment</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">p2</span><span class="special">,</span> <span class="identifier">sums</span> <span class="special">&</span> <span class="identifier">state</span><span class="special">)</span></pre>
182 <span class="bold"><strong>PointOfSegment const &</strong></span>:
183 <span class="emphasis"><em>p1</em></span>:
186 <span class="bold"><strong>PointOfSegment const &</strong></span>:
187 <span class="emphasis"><em>p2</em></span>:
190 <span class="bold"><strong>sums &</strong></span>: <span class="emphasis"><em>state</em></span>:
200 <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">result</span><span class="special">(</span><span class="identifier">sums</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">state</span><span class="special">,</span> <span class="identifier">Point</span> <span class="special">&</span> <span class="identifier">centroid</span><span class="special">)</span></pre>
208 <span class="bold"><strong>sums const &</strong></span>: <span class="emphasis"><em>state</em></span>:
211 <span class="bold"><strong>Point &</strong></span>: <span class="emphasis"><em>centroid</em></span>:
220 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h4"></a>
221 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.header"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.header">Header</a>
224 <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">strategies</span><span class="special">/</span><span class="identifier">cartesian</span><span class="special">/</span><span class="identifier">centroid_bashein_detmer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
227 <a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.h5"></a>
228 <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_bashein_detmer.see_also"></a></span><a class="link" href="strategy_centroid_bashein_detmer.html#geometry.reference.strategies.strategy_centroid_bashein_detmer.see_also">See
232 <a class="link" href="../algorithms/centroid/centroid_3_with_strategy.html" title="centroid (with strategy)">centroid
236 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
237 <td align="left"></td>
238 <td align="right"><div class="copyright-footer">Copyright © 2009-2019 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam
239 Wulkiewicz, Oracle and/or its affiliates<p>
240 Distributed under the Boost Software License, Version 1.0. (See accompanying
241 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>)
246 <div class="spirit-nav">
247 <a accesskey="p" href="strategy_centroid_average.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_convex_hull_graham_andrew.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>