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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Header <boost/algorithm/cxx17/transform_reduce.hpp>

Combine the (transformed) elements of a sequence (or two) into a single value.

Marshall Clow

namespace boost {
  namespace algorithm {
    template<typename InputIterator1, typename InputIterator2, typename T, 
             typename BinaryOperation1, typename BinaryOperation2> 
      T transform_reduce(InputIterator1 first1, InputIterator1 last1, 
                         InputIterator2 first2, T init, 
                         BinaryOperation1 bOp1, BinaryOperation2 bOp2);
    template<typename InputIterator, typename T, typename BinaryOperation, 
             typename UnaryOperation> 
      T transform_reduce(InputIterator first, InputIterator last, T init, 
                         BinaryOperation bOp, UnaryOperation uOp);
    template<typename InputIterator1, typename InputIterator2, typename T> 
      T transform_reduce(InputIterator1 first1, InputIterator1 last1, 
                         InputIterator2 first2, T init);
  }
}

PrevUpHomeNext