double sump(double* first1, double* last1, double* first2);
Returns the sum of the products of the corresponding elements in [first1, last1) and [first2, first2 + (last1 - first1) ).
Parameters:
first1 | Beginning iterator for the first container of elements. |
---|---|
last1 | Ending iterator for the first container of elements. |
first2 | Beginning iterator for the second container of elements. |
Returns:
Sum of the products
Usage:
double s[4] = {1.1, 2.2, 3.3, 4.4};
int t[4] = {4, 3, 2, 1};
double sm = sump(s, s + 4, t);
Header:
#include "descript.h"