iota(first, last, value)
返回void,对于0 <= n < (last - first),*(first + n) = value + n
accumulate(first, last, init)
返回s,s = init + *first + *(first + 1) + ... + *(last -1)
accumulate(first, last, init, pred)
返回s,s = pred(pred(...pred(pred(init, *first), *(first + 1)),...), *(last - 1))
inner_product(first1, last1, first2, init)
返回s,s = init + *first1 * *first2 + *(first1 + 1) * *(first2 + 1) + ... + *(last1 - 1) * *(first2 + (last1 - first1) - 1)
inner_product(first1, last1, first2, init, pred1, pred2)
返回s,s = init pred1 *first1 pred2 *first2 ...
partial_sum(first, last, result)
返回result+(last-first),对于0 <= n < (last-first),*(result + n) = accumulate(first, first + n, 0)
partial_sum(first, last, result, pred)
返回result+(last-first),对于0 <= n < (last-first),*(result + n) = accumulate(first, first + n, 0, pred)
adjacent_difference(first, last, result)
返回result+(last-first),*result = *first,对于1 <= n < (last-first),*(result + n) = *(first + n) - *(first + n - 1)
adjacent_difference(first, last, result, pred)
返回result+(last-first),*result = *first,对于1 <= n < (last-first),*(result + n) = pred(*(first + n), *(first + n - 1))
power(x, n)
返回p,p = x * x * ... * x
power(x, n, pred)
返回p,p = x pred x pred ...
评论