forked from boostorg/fusion
fusion: merge of associative iterators/views and the new fold interface
[SVN r58618]
This commit is contained in:
@ -1,10 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>count</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<<<<<<< .working
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
=======
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
|
||||
<<<<<<< .working
|
||||
>>>>>>> .merge-right.r57125
|
||||
<link rel="home" href="../../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
=======
|
||||
<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.0">
|
||||
>>>>>>> .merge-right.r58299
|
||||
<link rel="up" href="../functions.html" title="Functions">
|
||||
<link rel="previous" href="find_if.html" title="find_if">
|
||||
<link rel="next" href="count_if.html" title="count_if">
|
||||
@ -30,15 +38,65 @@
|
||||
<div></div>
|
||||
</div>
|
||||
<a name="fusion.algorithm.query.functions.count.description"></a><h6>
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id550460"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.description">Description</a>
|
||||
=======
|
||||
<a name="id801492"></a>
|
||||
=======
|
||||
<a name="id765424"></a>
|
||||
=======
|
||||
<a name="id757800"></a>
|
||||
=======
|
||||
<a name="id780387"></a>
|
||||
=======
|
||||
<a name="id767958"></a>
|
||||
=======
|
||||
<a name="id764681"></a>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.description">Description</a>
|
||||
>>>>>>> .merge-right.r57125
|
||||
</h6>
|
||||
<p>
|
||||
Returns the number of elements of a given type within a sequence.
|
||||
</p>
|
||||
<a name="fusion.algorithm.query.functions.count.synopsis"></a><h6>
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id550488"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.synopsis">Synopsis</a>
|
||||
=======
|
||||
<a name="id801509"></a>
|
||||
=======
|
||||
<a name="id765441"></a>
|
||||
=======
|
||||
<a name="id757816"></a>
|
||||
=======
|
||||
<a name="id780404"></a>
|
||||
=======
|
||||
<a name="id767974"></a>
|
||||
=======
|
||||
<a name="id764698"></a>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.synopsis">Synopsis</a>
|
||||
>>>>>>> .merge-right.r57125
|
||||
</h6>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">Sequence</span><span class="special">,</span>
|
||||
@ -48,8 +106,33 @@
|
||||
<span class="identifier">Sequence</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">seq</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">t</span><span class="special">);</span>
|
||||
</pre>
|
||||
<div class="table">
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id550689"></a><p class="title"><b>Table<EFBFBD>1.44.<2E>Parameters</b></p>
|
||||
<table class="table" summary="Parameters">
|
||||
=======
|
||||
<a name="id801654"></a><p class="title"><b>Table<EFBFBD>1.44.<2E>Parameters</b></p>
|
||||
=======
|
||||
<a name="id765586"></a><p class="title"><b>Table<EFBFBD>1.48.<2E>Parameters</b></p>
|
||||
=======
|
||||
<a name="id757962"></a><p class="title"><b>Table<EFBFBD>1.48.<2E>Parameters</b></p>
|
||||
=======
|
||||
<a name="id780549"></a><p class="title"><b>Table 1.48. Parameters</b></p>
|
||||
=======
|
||||
<a name="id768120"></a><p class="title"><b>Table 1.48. Parameters</b></p>
|
||||
=======
|
||||
<a name="id764843"></a><p class="title"><b>Table 1.48. Parameters</b></p>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
>>>>>>> .merge-right.r57125
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@ -97,9 +180,15 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<<<<<<< .working
|
||||
<a name="fusion.algorithm.query.functions.count.expression_semantics"></a><h6>
|
||||
<a name="id550879"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.expression_semantics">Expression
|
||||
=======
|
||||
<br class="table-break"><a name="fusion.algorithm.query.functions.count.expression_semantics"></a><h6>
|
||||
<a name="id764998"></a>
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.expression_semantics">Expression
|
||||
>>>>>>> .merge-right.r57125
|
||||
Semantics</a>
|
||||
</h6>
|
||||
<pre class="programlisting"><a href="count.html" title="count"><tt class="computeroutput"><span class="identifier">count</span></tt></a><span class="special">(</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">t</span><span class="special">);</span>
|
||||
@ -113,22 +202,97 @@
|
||||
<tt class="computeroutput"><span class="identifier">t</span></tt> in <tt class="computeroutput"><span class="identifier">seq</span></tt>.
|
||||
</p>
|
||||
<a name="fusion.algorithm.query.functions.count.complexity"></a><h6>
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id551015"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.complexity">Complexity</a>
|
||||
=======
|
||||
<a name="id801902"></a>
|
||||
=======
|
||||
<a name="id765834"></a>
|
||||
=======
|
||||
<a name="id758210"></a>
|
||||
=======
|
||||
<a name="id780797"></a>
|
||||
=======
|
||||
<a name="id769461"></a>
|
||||
=======
|
||||
<a name="id766184"></a>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.complexity">Complexity</a>
|
||||
>>>>>>> .merge-right.r57125
|
||||
</h6>
|
||||
<p>
|
||||
Linear. At most <tt class="computeroutput"><a href="../../../sequence/intrinsic/metafunctions/size.html" title="size"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">size</span></tt></a><span class="special"><</span><span class="identifier">Sequence</span><span class="special">>::</span><span class="identifier">value</span></tt> comparisons.
|
||||
</p>
|
||||
<a name="fusion.algorithm.query.functions.count.header"></a><h6>
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id551094"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.header">Header</a>
|
||||
=======
|
||||
<a name="id801953"></a>
|
||||
=======
|
||||
<a name="id765885"></a>
|
||||
=======
|
||||
<a name="id758260"></a>
|
||||
=======
|
||||
<a name="id781940"></a>
|
||||
=======
|
||||
<a name="id769511"></a>
|
||||
=======
|
||||
<a name="id766234"></a>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.header">Header</a>
|
||||
>>>>>>> .merge-right.r57125
|
||||
</h6>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">/</span><span class="identifier">query</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">count</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.algorithm.query.functions.count.example"></a><h6>
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<<<<<<< .working
|
||||
<a name="id551257"></a>
|
||||
<a href="count.html#fusion.algorithm.query.functions.count.example">Example</a>
|
||||
=======
|
||||
<a name="id802068"></a>
|
||||
=======
|
||||
<a name="id766000"></a>
|
||||
=======
|
||||
<a name="id758376"></a>
|
||||
=======
|
||||
<a name="id782056"></a>
|
||||
=======
|
||||
<a name="id769626"></a>
|
||||
=======
|
||||
<a name="id766350"></a>
|
||||
>>>>>>> .merge-right.r58559
|
||||
>>>>>>> .merge-right.r58549
|
||||
>>>>>>> .merge-right.r58299
|
||||
>>>>>>> .merge-right.r57337
|
||||
>>>>>>> .merge-right.r57242
|
||||
<a class="link" href="count.html#fusion.algorithm.query.functions.count.example">Example</a>
|
||||
>>>>>>> .merge-right.r57125
|
||||
</h6>
|
||||
<pre class="programlisting"><span class="keyword">const</span> <a href="../../../container/vector.html" title="vector"><tt class="computeroutput"><span class="identifier">vector</span></tt></a><span class="special"><</span><span class="keyword">double</span><span class="special">,</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vec</span><span class="special">(</span><span class="number">1.0</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">);</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><a href="count.html" title="count"><tt class="computeroutput"><span class="identifier">count</span></tt></a><span class="special">(</span><span class="identifier">vec</span><span class="special">,</span><span class="number">2</span><span class="special">)</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span>
|
||||
@ -136,7 +300,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright <EFBFBD> 2001-2007 Joel de Guzman, Dan Marsden, Tobias
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias
|
||||
Schwinger<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
|
Reference in New Issue
Block a user