libstdc++
|
|
inline |
Accumulate values in a range.
Accumulates the values in the range [first,last) using operator+(). The initial value is init. The values are processed in order.
__first | Start of range. |
__last | End of range. |
__init | Starting value to add other values to. |
Definition at line 132 of file stl_numeric.h.
|
inline |
Accumulate values in a range with operation.
Accumulates the values in the range `[first,last)` using the function object `__binary_op`. The initial value is `__init`. The values are processed in order.
__first | Start of range. |
__last | End of range. |
__init | Starting value to add other values to. |
__binary_op | Function object to accumulate with. |
Definition at line 158 of file stl_numeric.h.
_OutputIterator std::adjacent_difference | ( | _InputIterator | __first, |
_InputIterator | __last, | ||
_OutputIterator | __result | ||
) |
Return differences between adjacent values.
Computes the difference between adjacent values in the range [first,last) using operator-() and writes the result to __result
.
__first | Start of input range. |
__last | End of input range. |
__result | Output sums. |
_GLIBCXX_RESOLVE_LIB_DEFECTS DR 539. partial_sum and adjacent_difference should mention requirements
Definition at line 330 of file stl_numeric.h.
_OutputIterator std::adjacent_difference | ( | _InputIterator | __first, |
_InputIterator | __last, | ||
_OutputIterator | __result, | ||
_BinaryOperation | __binary_op | ||
) |
Return differences between adjacent values.
Computes the difference between adjacent values in the range [__first,__last) using the function object __binary_op
and writes the result to __result
.
__first | Start of input range. |
__last | End of input range. |
__result | Output sum. |
__binary_op | Function object. |
_GLIBCXX_RESOLVE_LIB_DEFECTS DR 539. partial_sum and adjacent_difference should mention requirements
Definition at line 373 of file stl_numeric.h.
|
inline |
Compute inner product of two ranges.
Starting with an initial value of __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.
__first1 | Start of range 1. |
__last1 | End of range 1. |
__first2 | Start of range 2. |
__init | Starting value to add other values to. |
Definition at line 186 of file stl_numeric.h.
|
inline |
Compute inner product of two ranges.
Starting with an initial value of __init
, applies __binary_op2
to successive elements from the two ranges and accumulates each result into the accumulated value using __binary_op1
. The values in the ranges are processed in order.
__first1 | Start of range 1. |
__last1 | End of range 1. |
__first2 | Start of range 2. |
__init | Starting value to add other values to. |
__binary_op1 | Function object to accumulate with. |
__binary_op2 | Function object to apply to pairs of input values. |
Definition at line 218 of file stl_numeric.h.
void std::iota | ( | _ForwardIterator | __first, |
_ForwardIterator | __last, | ||
_Tp | __value | ||
) |
Create a range of sequentially increasing values.
For each element in the range [first,last) assigns
value
and increments value
as if by ++value
.
__first | Start of range. |
__last | End of range. |
__value | Starting value. |
Definition at line 87 of file stl_numeric.h.
References std::iota().
Referenced by std::iota().
_OutputIterator std::partial_sum | ( | _InputIterator | __first, |
_InputIterator | __last, | ||
_OutputIterator | __result | ||
) |
Return list of partial sums.
Accumulates the values in the range [first,last) using the +
operator. As each successive input value is added into the total, that partial sum is written to __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.
__first | Start of input range. |
__last | End of input range. |
__result | Output sum. |
Definition at line 250 of file stl_numeric.h.
Referenced by __gnu_parallel::__parallel_random_shuffle_drs_pu(), and __gnu_parallel::__sequential_random_shuffle().
_OutputIterator std::partial_sum | ( | _InputIterator | __first, |
_InputIterator | __last, | ||
_OutputIterator | __result, | ||
_BinaryOperation | __binary_op | ||
) |
Return list of partial sums.
Accumulates the values in the range [first,last) using __binary_op
. As each successive input value is added into the total, that partial sum is written to __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.
__first | Start of input range. |
__last | End of input range. |
__result | Output sum. |
__binary_op | Function object. |
Definition at line 291 of file stl_numeric.h.