Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ row_map()

template<typename F , typename T , typename... Args, require_eigen_matrix_dynamic_t< T > * = nullptr>
auto stan::math::row_map ( F &&  f,
T &&  m,
Args &&...  args 
)
inline

Return a matrix whose i-th row is f(m.row(i), args...).

Additional arguments are shared across calls. If m has zero rows, or if the first returned row is empty, returns a 0x0 matrix. All returned rows must have the same number of columns.

Template Parameters
Ftype of functor
Ttype of Eigen matrix
Argstypes of shared arguments
Parameters
[in]ffunctor applied to each row
[in]minput matrix
[in]argsshared arguments passed to each call
Returns
matrix of results
Exceptions
std::invalid_argumentif returned rows have inconsistent sizes

Definition at line 106 of file map.hpp.