SyTen

◆ mapVector() [2/2]

template<typename T , typename U , typename F >
auto syten::mapVector ( std::vector< T > const &  a,
std::vector< U > const &  b,
f 
)

Maps a binary function over two vectors.

Parameters
afirst input vector
bsecond input vector
ffunction to call on elements of a and b as f(a[i], b[i])
Returns
a vector containing the results of f for all vector elements.

References std::vector< T >::reserve(), and std::vector< T >::size().

+ Here is the call graph for this function: