Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / geometry / doc / html / geometry / reference / strategies / strategy_centroid_average.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>strategy::centroid::average</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&#160;1.&#160;Geometry">
8 <link rel="up" href="../strategies.html" title="Strategies">
9 <link rel="prev" href="strategy_buffer_side_straight.html" title="strategy::buffer::side_straight">
10 <link rel="next" href="strategy_centroid_bashein_detmer.html" title="strategy::centroid::bashein_detmer">
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_buffer_side_straight.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_centroid_bashein_detmer.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_centroid_average"></a><a class="link" href="strategy_centroid_average.html" title="strategy::centroid::average">strategy::centroid::average</a>
28 </h4></div></div></div>
29 <p>
30           <a class="indexterm" name="idm46186973619136"></a><a class="indexterm" name="idm46186973618448"></a><a class="indexterm" name="idm46186973617760"></a>
31 Centroid calculation taking average of points.
32         </p>
33 <h6>
34 <a name="geometry.reference.strategies.strategy_centroid_average.h0"></a>
35           <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_average.synopsis"></a></span><a class="link" href="strategy_centroid_average.html#geometry.reference.strategies.strategy_centroid_average.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">PointCentroid</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Point</span><span class="special">&gt;</span>
40 <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">average</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_centroid_average.h1"></a>
49           <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_average.template_parameter_s_"></a></span><a class="link" href="strategy_centroid_average.html#geometry.reference.strategies.strategy_centroid_average.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>
76 <tr>
77 <td>
78                   <p>
79                     typename PointCentroid
80                   </p>
81                 </td>
82 <td>
83                 </td>
84 <td>
85                 </td>
86 </tr>
87 <tr>
88 <td>
89                   <p>
90                     typename Point
91                   </p>
92                 </td>
93 <td>
94                   <p>
95                     PointCentroid
96                   </p>
97                 </td>
98 <td>
99                 </td>
100 </tr>
101 </tbody>
102 </table></div>
103 <h6>
104 <a name="geometry.reference.strategies.strategy_centroid_average.h2"></a>
105           <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_average.member_function_s_"></a></span><a class="link" href="strategy_centroid_average.html#geometry.reference.strategies.strategy_centroid_average.member_function_s_">Member
106           Function(s)</a>
107         </h6>
108 <div class="informaltable"><table class="table">
109 <colgroup>
110 <col>
111 <col>
112 <col>
113 <col>
114 </colgroup>
115 <thead><tr>
116 <th>
117                   <p>
118                     Function
119                   </p>
120                 </th>
121 <th>
122                   <p>
123                     Description
124                   </p>
125                 </th>
126 <th>
127                   <p>
128                     Parameters
129                   </p>
130                 </th>
131 <th>
132                   <p>
133                     Returns
134                   </p>
135                 </th>
136 </tr></thead>
137 <tbody>
138 <tr>
139 <td>
140                   <p>
141 </p>
142 <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">Point</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">sum</span> <span class="special">&amp;</span> <span class="identifier">state</span><span class="special">)</span></pre>
143 <p>
144                   </p>
145                 </td>
146 <td>
147                 </td>
148 <td>
149                   <p>
150                     <span class="bold"><strong>Point const &amp;</strong></span>: <span class="emphasis"><em>p</em></span>:
151                   </p>
152                   <p>
153                     <span class="bold"><strong>sum &amp;</strong></span>: <span class="emphasis"><em>state</em></span>:
154                   </p>
155                 </td>
156 <td>
157                 </td>
158 </tr>
159 <tr>
160 <td>
161                   <p>
162 </p>
163 <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">sum</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">state</span><span class="special">,</span> <span class="identifier">PointCentroid</span> <span class="special">&amp;</span> <span class="identifier">centroid</span><span class="special">)</span></pre>
164 <p>
165                   </p>
166                 </td>
167 <td>
168                 </td>
169 <td>
170                   <p>
171                     <span class="bold"><strong>sum const &amp;</strong></span>: <span class="emphasis"><em>state</em></span>:
172                   </p>
173                   <p>
174                     <span class="bold"><strong>PointCentroid &amp;</strong></span>: <span class="emphasis"><em>centroid</em></span>:
175                   </p>
176                 </td>
177 <td>
178                 </td>
179 </tr>
180 </tbody>
181 </table></div>
182 <h6>
183 <a name="geometry.reference.strategies.strategy_centroid_average.h3"></a>
184           <span class="phrase"><a name="geometry.reference.strategies.strategy_centroid_average.header"></a></span><a class="link" href="strategy_centroid_average.html#geometry.reference.strategies.strategy_centroid_average.header">Header</a>
185         </h6>
186 <p>
187           <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">centroid_average</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
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 &#169; 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_buffer_side_straight.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_centroid_bashein_detmer.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
202 </div>
203 </body>
204 </html>