blob: 71d417c3af26ffc1f9a783de1f42a9a838c5f9a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter 24. Numerics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="extensions.html" title="Part III. Extensions"/><link rel="prev" href="ext_algorithms.html" title="Chapter 23. Algorithms"/><link rel="next" href="ext_iterators.html" title="Chapter 25. Iterators"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Numerics</th></tr><tr><td align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><th width="60%" align="center">Part III.
Extensions
</th><td align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 24. Numerics"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.numerics"/>Chapter 24. Numerics</h2></div></div></div><p>26.4, the generalized numeric operations such as accumulate, are extended
with the following functions:
</p><pre class="programlisting">
power (x, n);
power (x, n, moniod_operation);</pre><p>Returns, in FORTRAN syntax, "x ** n" where n>=0. In the
case of n == 0, returns the identity element for the
monoid operation. The two-argument signature uses multiplication (for
a true "power" implementation), but addition is supported as well.
The operation functor must be associative.
</p><p>The <code class="code">iota</code> function wins the award for Extension With the
Coolest Name. It "assigns sequentially increasing values to a range.
That is, it assigns value to *first, value + 1 to *(first + 1) and so
on." Quoted from SGI documentation.
</p><pre class="programlisting">
void iota(_ForwardIter first, _ForwardIter last, _Tp value);</pre></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="ext_algorithms.html">Prev</a> </td><td align="center"><a accesskey="u" href="extensions.html">Up</a></td><td align="right"> <a accesskey="n" href="ext_iterators.html">Next</a></td></tr><tr><td align="left" valign="top">Chapter 23. Algorithms </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Chapter 25. Iterators</td></tr></table></div></body></html>
|