Home | Libraries | People | FAQ | More |
template<class SinglePassRange, class OutputIterator> OutputIterator partial_sum(const SinglePassRange& rng, OutputIterator out_it); template<class SinglePassRange, class OutputIterator, class BinaryOperation> OutputIterator partial_sum(const SinglePassRange& rng, OutputIterator out_it, BinaryOperation op);
partial_sum
calculates
a generalised partial sum of rng
in the same manner as std::partial_sum(boost::begin(rng), boost::end(rng), out_it)
. See partial_sum.
Defined in the header file boost/range/numeric.hpp
SinglePassRange
is
a model of the Single
Pass Range Concept.
OutputIterator
is
a model of the OutputIteratorConcept
.
x
and y
are objects of SinglePassRange
's value type, then
x +
y
is defined.
x + y
is convertible to the value type of SinglePassRange
.
SinglePassRange
is convertible to a type in OutputIterator
's
set of value types.
SinglePassRange
is
a model of the Single
Pass Range Concept.
OutputIterator
is
a model of the OutputIteratorConcept
.
BinaryOperation
is
a model of the BinaryFunctionConcept
.
BinaryOperation
is convertible to the value type of SinglePassRange
.
SinglePassRange
is convertible to a type in OutputIterator
's
set of value types.
[result, result
+ distance(rng))
is a valid range.
Linear. If empty(rng)
then zero applications, otherwise distance(rng) - 1
applications are performed.