[#absl-c_inner_product-09] = xref:absl.adoc[absl]::c_inner_product :relfileprefix: ../ :mrdocs: `c_inner_product` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <numeric> `std::inner_product()` function to compute the cumulative inner product of container element pairs. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Sequence1, typename Sequence2, typename T> constexpr std::decay_t<T> xref:absl/c_inner_product-03.adoc[c_inner_product]( Sequence1 const& factors1, Sequence2 const& factors2, T&& sum); ---- [.small]#xref:absl/c_inner_product-03.adoc[_» more..._]# Overload of `c_inner_product()` for using binary operations other than `operator+` (for computing the accumulation) and `operator*` (for computing the product between the two container's element pair). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename Sequence1, typename Sequence2, typename T, typename BinaryOp1, typename BinaryOp2> constexpr std::decay_t<T> xref:absl/c_inner_product-0d.adoc[c_inner_product]( Sequence1 const& factors1, Sequence2 const& factors2, T&& sum, BinaryOp1&& op1, BinaryOp2&& op2); ---- [.small]#xref:absl/c_inner_product-0d.adoc[_» more..._]# == Return Value The computed inner product. == Parameters [cols="1,4"] |=== | Name| Description | *factors1* | The first container of factors. | *factors2* | The second container of factors. | *sum* | The initial value of the accumulation. | *op1* | The binary operation used to accumulate the products. | *op2* | The binary operation used to combine element pairs. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#