diff --git a/doc/algorithm.qbk b/doc/algorithm.qbk index 06d8092..50b3044 100644 --- a/doc/algorithm.qbk +++ b/doc/algorithm.qbk @@ -111,6 +111,11 @@ Apply a functor to the elements of a sequence Transform each element in a range then combine adjacent elements to create an output range. Inclusive scaning means that the nth input is present in the nth output. [endsect:transform_inclusive_scan] +[section:transform_exclusive_scan transform_exclusive_scan] +[*[^[link boost.algorithm.transform_exclusive_scan transform_exclusive_scan] ] ] +Transform each element in a range then combine adjacent elements to create an output range. Exclusive scanning means that the nth input is not present in the nth output. +[endsect:transform_exclusive_scan] + [endsect:CXX17_inner_algorithms] [endsect:CXX17] @@ -239,7 +244,6 @@ Raise a value to an integral power ([^constexpr] since C++14) * [*[^[link header.boost.algorithm.cxx17.exclusive_scan_hpp exclusive_scan] ] ] * [*[^[link header.boost.algorithm.cxx17.inclusive_scan_hpp inclusive_scan] ] ] * [*[^[link header.boost.algorithm.cxx17.reduce_hpp reduce] ] ] -* [*[^[link header.boost.algorithm.cxx17.transform_exclusive_scan_hpp transform_exclusive_scan] ] ] * [*[^[link header.boost.algorithm.cxx17.transform_reduce_hpp transform_reduce] ] ] [endsect:not_yet_documented_cxx17_algos] diff --git a/include/boost/algorithm/cxx17/transform_exclusive_scan.hpp b/include/boost/algorithm/cxx17/transform_exclusive_scan.hpp index 68318a5..86446b8 100644 --- a/include/boost/algorithm/cxx17/transform_exclusive_scan.hpp +++ b/include/boost/algorithm/cxx17/transform_exclusive_scan.hpp @@ -22,6 +22,21 @@ namespace boost { namespace algorithm { +/// \fn transform_exclusive_scan ( InputIterator first, InputIterator last, OutputIterator result, BinaryOperation bOp, UnaryOperation uOp, T init ) +/// \brief 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. Exclusivity means that the nth element is not +/// included in the nth combination. +/// \return The updated output iterator +/// +/// \param first The start of the input sequence +/// \param last The end of the input sequence +/// \param result The output iterator to write the results into +/// \param bOp The operation for combining transformed input elements +/// \param uOp The operation for transforming input elements +/// \param init The initial value +/// +/// \note This function is part of the C++17 standard library template OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last,