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

◆ to_matrix() [12/13]

template<typename EigMat , require_eigen_t< EigMat > * = nullptr>
Eigen::Matrix< value_type_t< EigMat >, Eigen::Dynamic, Eigen::Dynamic > stan::math::to_matrix ( EigMat &&  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
EigMattype of the matrix
Parameters
xmatrix
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
Reshaped inputted matrix
Exceptions
<code>std::invalid_argument</code>if the sizes do not match

Definition at line 179 of file to_matrix.hpp.