[#absl-c_partial_sum-0c0] = xref:absl.adoc[absl]::c_partial_sum :relfileprefix: ../ :mrdocs: `c_partial_sum` overloads == Synopses Declared in `<absl/algorithm/container.h>` Container‐based version of the <numeric> `std::partial_sum()` function to compute the partial sum of the elements in a sequence and write them to an iterator. The partial sum is the sum of all element values so far in the sequence. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputIt> constexpr OutputIt xref:absl/c_partial_sum-07.adoc[c_partial_sum]( InputSequence const& input, OutputIt output_first); ---- [.small]#xref:absl/c_partial_sum-07.adoc[_» more..._]# Overload of `c_partial_sum()` for using a binary operation other than addition to compute the "partial sum". [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputSequence, typename OutputIt, typename BinaryOp> constexpr OutputIt xref:absl/c_partial_sum-0c7.adoc[c_partial_sum]( InputSequence const& input, OutputIt output_first, BinaryOp&& op); ---- [.small]#xref:absl/c_partial_sum-0c7.adoc[_» more..._]# == Return Value An iterator to the end of the written range in the output. == Parameters [cols="1,4"] |=== | Name| Description | *input* | The container whose elements to sum. | *output_first* | The output iterator receiving the partial sums. | *op* | The binary operation used to combine values. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#