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

◆ cholesky_corr_constrain() [5/5]

template<typename T , require_var_vector_t< T > * = nullptr>
var_value< Eigen::MatrixXd > stan::math::cholesky_corr_constrain ( const T &  y,
int  K,
scalar_type_t< T > &  lp 
)

Return the Cholesky factor of the correlation matrix of the sepcified size read from the unconstrained vector y.

A total of K choose 2 elements are required to build a K by K Cholesky factor.

Template Parameters
Ttype of input vector (must be a var_value<S> where S inherits from EigenBase)
Parameters
yVector of unconstrained values
Knumber of rows
[out]lpLog density that is incremented with the log Jacobian
Returns
Cholesky factor of correlation matrix

Definition at line 92 of file cholesky_corr_constrain.hpp.