cppannotations/yo/stl/innerproduct.yo
fbbrokken 6881bc3814 The trunk directory contains the latest version (6.4.0c) of the C++
Annotations. 

The branches and tags directory are empty, since I couldn't
svnadmin import a repostitory dump. Many earlier versions exist, though, and
if you want the full archive, just let me know and I'll send you the svnadmin
dump of my full C++ Annotations archive.

Frank B. Brokken <f.b.brokken@rug.nl>



git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@3 f6dd340e-d3f9-0310-b409-bdd246841980
2006-09-04 08:26:34 +00:00

31 lines
1.4 KiB
Text

hi(inner_product())
itemization(
it() Header file:
centt(#include <numeric>)
it() Function prototypes:
itemization(
itt(Type inner_product+OPENPARInputIterator1 first1,
InputIterator1 last1,)linebreak()
tt(InputIterator2 first2, Type init+CLOSEPAR;)
itt(Type inner_product+OPENPARInputIterator1 first1,
InputIterator1 last1,)linebreak()
tt(InputIterator2 first2, Type init, BinaryOperator1 op1,
BinaryOperator2 op2+CLOSEPAR;)
)
it() Description:
itemization(
it() The first prototype: the sum of all pairwise products of the
elements implied by the range rangett(first1, last1) and the same number of
elements starting at the element pointed to by tt(first2)
are added to tt(init), and this sum is returned. The function uses the
tt(operator+()) and tt(operator*()) of the data type to which the iterators
point.
it() The second prototype: binary operator tt(op1) instead of the
default addition operator, and binary operator tt(op2) instead of the default
multiplication operator are applied to all pairwise elements implied by the
range rangett(first1, last1) and the same number of elements starting at the
element pointed to by tt(first2). The final result is returned.
)
it() Example:
verbinclude(stl/cc/innerproduct.cc)
)