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

◆ cholesky_factor_constrain() [5/5]

template<typename T , require_var_vector_t< T > * = nullptr>
var_value< Eigen::MatrixXd > stan::math::cholesky_factor_constrain ( const T &  x,
int  M,
int  N,
scalar_type_t< T > &  lp 
)

Return the Cholesky factor of the specified size read from the specified vector and increment the specified log probability reference with the log Jacobian 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 input vector (must be a var_value<S> where S inherits from EigenBase)
Parameters
xVector of unconstrained values
Mnumber of rows
Nnumber of columns
[out]lpLog density that is incremented with the log Jacobian
Returns
Cholesky factor

Definition at line 89 of file cholesky_factor_constrain.hpp.