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

◆ cholesky_factor_constrain() [2/5]

template<typename T , require_eigen_vector_t< T > * = nullptr>
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > stan::math::cholesky_factor_constrain ( const T &  x,
int  M,
int  N,
return_type_t< T > &  lp 
)
inline

Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log absolute Jacobian determinant adjustment of the transform.

A total of (N choose 2) + N + N * (M - N) free parameters are required to read an M by N Cholesky factor.

Template Parameters
Ttype of the vector (must be derived from Eigen::MatrixBase and have one compile-time dimension equal to 1)
Parameters
xVector of unconstrained values
Mnumber of rows
Nnumber of columns
lpLog probability that is incremented with the log absolute Jacobian determinant
Returns
Cholesky factor

Definition at line 75 of file cholesky_factor_constrain.hpp.