std::inner_product is an
STLalgorithm
to calculate the inner product of one or two containers,
but can be used to do other operations than (!) summing the results, and
(2) multiplying the pairwise elements.