Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

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:

bOp

The operation for combining transformed input elements

The operation for combining transformed input elements

first

The start of the input sequence

The start of the input sequence

init

The initial value

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

uOp

The operation for transforming input elements

The operation for transforming input elements

Returns:

The updated output iterator

Returns:

The updated output iterator


PrevUpHomeNext