Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Function template transform_inclusive_scan

boost::algorithm::transform_inclusive_scan — Transforms elements from the input range with uOp and then combines those transformed elements with bOp such that the n-1th element and the nth element are combined. Inclusivity means that the nth element is included in the nth combination.

Synopsis

// In header: <boost/algorithm/cxx17/transform_inclusive_scan.hpp>


template<typename InputIterator, typename OutputIterator, 
         typename BinaryOperation, typename UnaryOperation, typename T> 
  OutputIterator 
  transform_inclusive_scan(InputIterator first, InputIterator last, 
                           OutputIterator result, BinaryOperation bOp, 
                           UnaryOperation uOp, T init);

Description

Transforms elements from the input range with uOp and then combines those transformed elements with bOp such that the n-1th element and the nth element are combined. Inclusivity means that the nth element is included in the nth combination. The first value will be used as the init.

[Note] Note

This function is part of the C++17 standard library

[Note] Note

This function is part of the C++17 standard library

Parameters:

first

The start of the input sequence

The start of the input sequence

last

The end of the input sequence

The end of the input sequence

result

The output iterator to write the results into

The output iterator to write the results into

bOp

The operation for combining transformed input elements

The operation for combining transformed input elements

uOp

The operation for transforming input elements

The operation for transforming input elements

init

The initial value

Returns:

The updated output iterator

Returns:

The updated output iterator


PrevUpHomeNext