*: Regenerate.
[gcc.git] / libstdc++-v3 / doc / html / manual / ext_algorithms.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 25. Algorithms</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><meta name="keywords" content="
2 ISO C++
3 ,
4 library
5 "><meta name="keywords" content="
6 ISO C++
7 ,
8 runtime
9 ,
10 library
11 "><link rel="home" href="../index.html" title="The GNU C++ Library"><link rel="up" href="extensions.html" title="Part III.  Extensions"><link rel="prev" href="ext_utilities.html" title="Chapter 24. Utilities"><link rel="next" href="ext_numerics.html" title="Chapter 26. Numerics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 25. Algorithms</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><th width="60%" align="center">Part III. 
12 Extensions
13
14 </th><td width="20%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 25. Algorithms"><div class="titlepage"><div><div><h2 class="title"><a name="manual.ext.algorithms"></a>Chapter 25. Algorithms</h2></div></div></div><p>25.1.6 (count, count_if) is extended with two more versions of count
15 and count_if. The standard versions return their results. The
16 additional signatures return void, but take a final parameter by
17 reference to which they assign their results, e.g.,
18 </p><pre class="programlisting">
19 void count (first, last, value, n);</pre><p>25.2 (mutating algorithms) is extended with two families of signatures,
20 random_sample and random_sample_n.
21 </p><p>25.2.1 (copy) is extended with
22 </p><pre class="programlisting">
23 copy_n (_InputIter first, _Size count, _OutputIter result);</pre><p>which copies the first 'count' elements at 'first' into 'result'.
24 </p><p>25.3 (sorting 'n' heaps 'n' stuff) is extended with some helper
25 predicates. Look in the doxygen-generated pages for notes on these.
26 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="code">is_heap</code> tests whether or not a range is a heap.</p></li><li class="listitem"><p><code class="code">is_sorted</code> tests whether or not a range is sorted in
27 nondescending order.</p></li></ul></div><p>25.3.8 (lexicographical_compare) is extended with
28 </p><pre class="programlisting">
29 lexicographical_compare_3way(_InputIter1 first1, _InputIter1 last1,
30 _InputIter2 first2, _InputIter2 last2)</pre><p>which does... what?
31 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ext_utilities.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="extensions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_numerics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 24. Utilities </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 26. Numerics</td></tr></table></div></body></html>