accumulate?就是sum up a range of elements。呵呵。这个挺简单的。下面是这个算法的简介:
Syntax: #include <numeric>//呵呵,使用这个算法这个头文件是必须要包括进来滴!TYPE accumulate( input_iterator start, input_iterator end, TYPE val );TYPE accumulate( input_iterator start, input_iterator end, TYPE val, BinaryFunction f );
The accumulate function computes the sum of val and all of the elements in the range [start,end). If the binary function f is specified, it is used instead of the + ......
阅读全文