diff --git a/doc/algorithm.qbk b/doc/algorithm.qbk index 64e8dfb..50b3044 100644 --- a/doc/algorithm.qbk +++ b/doc/algorithm.qbk @@ -106,6 +106,16 @@ Generate an increasing series Apply a functor to the elements of a sequence [endsect:for_each_n] +[section:transform_inclusive_scan transform_inclusive_scan] +[*[^[link boost.algorithm.transform_inclusive_scan transform_inclusive_scan] ] ] +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] @@ -234,8 +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_inclusive_scan_hpp transform_inclusive_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, diff --git a/include/boost/algorithm/cxx17/transform_inclusive_scan.hpp b/include/boost/algorithm/cxx17/transform_inclusive_scan.hpp index 3160770..9d877c0 100644 --- a/include/boost/algorithm/cxx17/transform_inclusive_scan.hpp +++ b/include/boost/algorithm/cxx17/transform_inclusive_scan.hpp @@ -22,6 +22,21 @@ namespace boost { namespace algorithm { +/// \fn transform_inclusive_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. Inclusivity means that the nth element is 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_inclusive_scan(InputIterator first, InputIterator last, @@ -37,6 +52,20 @@ OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, return result; } +/// \fn transform_inclusive_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. Inclusivity means that the nth element is included in +/// the nth combination. The first value will be used as the init. +/// \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 +/// +/// \note This function is part of the C++17 standard library template OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last,