Defined in stream/stream.hpp
Classes¶
Sum¶
-
template <typename T>
structSum
¶ Sum struct to accumulate the values.
Public Functions
-
Sum
()¶ Constructor.
-
T
Zero
()¶ Get the initial value.
- Return
- The initial value.
-
void
operator()
(T n)¶ Call operator to accumulate a value.
- Parameters
n
: a value to be accumulated.
Public Members
-
T
sum
¶ The sum value.
-
Functions¶
accumulate¶
-
template <typename It, typename Result = typename std::iterator_traits<It>::value_type>
Resultstream
::
accumulate
(It first, It last)¶ Computes the sum of the given values.
- Return
- The result.
- Parameters
first
: the range first.last
: the range last.