24.4.5 Other Algorithms (cont.)
- Some numeric algorithms described in <numeric>
- accumulate (described in sect. 16.5)
list<double> data;
double sum = accumulate(data.begin(), data.end(), 0.0);
// Now sum contains the sum of the elements
in the list
- Other numeric algorithms include inner products and partial sums of
sequences
prev
|top
|next