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

◆ to_matrix() [13/13]

template<typename T >
Eigen::Matrix< return_type_t< T, double >, Eigen::Dynamic, Eigen::Dynamic > stan::math::to_matrix ( const std::vector< T > &  x,
int  m,
int  n,
bool  col_major 
)
inline

Returns a matrix representation of the vector in column-major order with the specified number of rows and columns.

Template Parameters
Ttype of elements in the vector
Parameters
xvector of values
mrows
ncolumns
col_majorcolumn-major indicator: if 1, output matrix is transversed in column-major order, if 0, output matrix is transversed in row-major order, otherwise function throws std::invalid_argument
Returns
the matrix representation of the input
Exceptions
<code>std::invalid_argument</code>if the sizes do not match

Definition at line 208 of file to_matrix.hpp.