[#absl-c_inner_product-09]
= xref:absl.adoc[absl]::c&lowbar;inner&lowbar;product
:relfileprefix: ../
:mrdocs:

`c&lowbar;inner&lowbar;product` overloads

== Synopses

Declared in `&lt;absl&sol;algorithm&sol;container&period;h&gt;`

Container&hyphen;based version of the &lt;numeric&gt; `std&colon;&colon;inner&lowbar;product()` function to compute the cumulative inner product of container element pairs&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence1,
    typename Sequence2,
    typename T&gt;
constexpr
std::decay&lowbar;t&lt;T&gt;
xref:absl/c_inner_product-03.adoc[c&lowbar;inner&lowbar;product](
    Sequence1 const& factors1,
    Sequence2 const& factors2,
    T&& sum);
----

[.small]#xref:absl/c_inner_product-03.adoc[_» more&period;&period;&period;_]#

Overload of `c&lowbar;inner&lowbar;product()` for using binary operations other than `operator&plus;` (for computing the accumulation) and `operator&ast;` (for computing the product between the two container&apos;s element pair)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Sequence1,
    typename Sequence2,
    typename T,
    typename BinaryOp1,
    typename BinaryOp2&gt;
constexpr
std::decay&lowbar;t&lt;T&gt;
xref:absl/c_inner_product-0d.adoc[c&lowbar;inner&lowbar;product](
    Sequence1 const& factors1,
    Sequence2 const& factors2,
    T&& sum,
    BinaryOp1&& op1,
    BinaryOp2&& op2);
----

[.small]#xref:absl/c_inner_product-0d.adoc[_» more&period;&period;&period;_]#

== Return Value

The computed inner product&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *factors1*
| The first container of factors&period;
| *factors2*
| The second container of factors&period;
| *sum*
| The initial value of the accumulation&period;
| *op1*
| The binary operation used to accumulate the products&period;
| *op2*
| The binary operation used to combine element pairs&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
