ADC Home > Reference Library > Reference > Darwin > Miscellaneous User Space API Reference
|
stl_numeric.h |
This is an internal header file, included by other library headers. You should not attempt to use it directly.
accumulate(_InputIterator, _InputIterator, _Tp) |
template<typename _InputIterator, typename _Tp> _Tp accumulate( _InputIterator __first, _InputIterator __last, _Tp __init)
first
last
init
The final sum.
@brief Accumulate values in a range.
Accumulates the values in the range [first,last) using operator+(). The
initial value is @a init. The values are processed in order.
accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) |
template<typename _InputIterator, typename _Tp, typename _BinaryOperation> _Tp accumulate( _InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
first
last
init
binary_op
The final sum.
@brief Accumulate values in a range with operation.
Accumulates the values in the range [first,last) using the function
object @a binary_op. The initial value is @a init. The values are
processed in order.
adjacent_difference(_InputIterator, _InputIterator, _OutputIterator) |
template<typename _InputIterator, typename _OutputIterator> _OutputIterator adjacent_difference( _InputIterator __first, _InputIterator __last, _OutputIterator __result)
first
last
result
Iterator pointing just beyond the values written to result.
@brief Return differences between adjacent values.
Computes the difference between adjacent values in the range
[first,last) using operator-() and writes the result to @a result.
adjacent_difference(_InputIterator, _InputIterator, _OutputIterator, _BinaryOperation) |
template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> _OutputIterator adjacent_difference( _InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
first
last
result
Iterator pointing just beyond the values written to result.
@brief Return differences between adjacent values.
Computes the difference between adjacent values in the range
[first,last) using the function object @a binary_op and writes the
result to @a result.
inner_product(_InputIterator1, _InputIterator1, _InputIterator2, _Tp) |
template<typename _InputIterator1, typename _InputIterator2, typename _Tp> _Tp inner_product( _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
first1
last1
first2
init
The final inner product.
@brief Compute inner product of two ranges.
Starting with an initial value of @a init, multiplies successive
elements from the two ranges and adds each product into the accumulated
value using operator+(). The values in the ranges are processed in
order.
inner_product(_InputIterator1, _InputIterator1, _InputIterator2, _Tp, _BinaryOperation1, _BinaryOperation2) |
template<typename _InputIterator1, typename _InputIterator2, typename _Tp, typename _BinaryOperation1, typename _BinaryOperation2> _Tp inner_product( _InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
first1
last1
first2
init
binary_op1
binary_op2
The final inner product.
@brief Compute inner product of two ranges.
Starting with an initial value of @a init, applies @a binary_op2 to
successive elements from the two ranges and accumulates each result into
the accumulated value using @a binary_op1. The values in the ranges are
processed in order.
partial_sum(_InputIterator, _InputIterator, _OutputIterator) |
template<typename _InputIterator, typename _OutputIterator> _OutputIterator partial_sum( _InputIterator __first, _InputIterator __last, _OutputIterator __result)
first
last
result
Iterator pointing just beyond the values written to result.
@brief Return list of partial sums
Accumulates the values in the range [first,last) using operator+().
As each successive input value is added into the total, that partial sum
is written to @a result. Therefore, the first value in result is the
first value of the input, the second value in result is the sum of the
first and second input values, and so on.
partial_sum(_InputIterator, _InputIterator, _OutputIterator, _BinaryOperation) |
template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> _OutputIterator partial_sum( _InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op)
first
last
result
Iterator pointing just beyond the values written to result.
@brief Return list of partial sums
Accumulates the values in the range [first,last) using operator+().
As each successive input value is added into the total, that partial sum
is written to @a result. Therefore, the first value in result is the
first value of the input, the second value in result is the sum of the
first and second input values, and so on.