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

◆ col_map()

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

Return a matrix whose j-th column is f(m.col(j), args...).

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

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

Definition at line 152 of file map.hpp.