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

◆ to_matrix() [3/13]

template<typename T_x , require_nonscalar_prim_or_rev_kernel_expression_t< T_x > * = nullptr>
auto stan::math::to_matrix ( const T_x &  x,
int  m,
int  n,
bool  col_major 
) -> decltype(to_matrix(x, m, n))
inline

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

Template Parameters
T_xtype 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
Returns
the matrix representation of the input
Exceptions
<code>std::invalid_argument</code>if the sizes do not match

Definition at line 70 of file to_matrix.hpp.