mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
28 lines
1.4 KiB
Text
28 lines
1.4 KiB
Text
hi(inner_product)
|
|
itemization(
|
|
it() Header file: tt(<numeric>)
|
|
it() Function prototypes:
|
|
itemization(
|
|
itt(Type inner_product(InputIterator1 first1,
|
|
InputIterator1 last1, InputIterator2 first2, Type init);)
|
|
itt(Type inner_product(InputIterator1 first1,
|
|
InputIterator1 last1, InputIterator2 first2, Type init,
|
|
BinaryOperator1 op1, BinaryOperator2 op2);)
|
|
)
|
|
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 results of the binary operator calls are
|
|
added to tt(init) and tt(init)'s final value is returned.
|
|
)
|
|
it() Example:
|
|
verbinclude(-a examples/innerproduct.cc)
|
|
)
|