c_adjacent_difference overloads
Synopses
Declared in <absl/algorithm/container.h>
Container‐based version of the <numeric> std::adjacent_difference() function to compute the difference between each element and the one preceding it and write it to an iterator.
template<
typename InputSequence,
typename OutputIt>
constexpr
OutputIt
c_adjacent_difference(
InputSequence const& input,
OutputIt output_first);
Overload of c_adjacent_difference() for using a binary operation other than subtraction to compute the adjacent difference.
template<
typename InputSequence,
typename OutputIt,
typename BinaryOp>
constexpr
OutputIt
c_adjacent_difference(
InputSequence const& input,
OutputIt output_first,
BinaryOp&& op);
Return Value
An iterator to the end of the written range in the output.
Parameters
Name |
Description |
input |
The container whose elements to process. |
output_first |
The output iterator receiving the differences. |
op |
The binary operation used to compute each difference. |
Created with MrDocs