Syntax:
#include <numeric>
output_iterator adjacent_difference( input_iterator start, input_iterator end, output_iterator result );
output_iterator adjacent_difference( input_iterator start, input_iterator end, output_iterator result, BinaryFunction f );
The adjacent_difference() function calculates the differences between adjacent elements in the range [start,end) and stores the result starting at result. (Specifically, the element at start will be copied to result; ......
阅读全文