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

◆ cholesky_corr_constrain() [2/6]

template<typename EigVec , typename Lp , require_eigen_col_vector_t< EigVec > * = nullptr, require_convertible_t< return_type_t< EigVec >, Lp > * = nullptr>
Eigen::Matrix< value_type_t< EigVec >, Eigen::Dynamic, Eigen::Dynamic > stan::math::cholesky_corr_constrain ( EigVec &&  y,
int  K,
Lp &  lp 
)
inline

Return the Cholesky factor of a K x K correlation matrix from the K (K - 1) / 2 unconstrained values y, and add the log absolute Jacobian determinant of the transform to lp.

Template Parameters
EigVectype of the vector
Lpscalar type of the log density accumulator
Parameters
yunconstrained values
Knumber of rows
[in,out]lplog density accumulator
Returns
Cholesky factor of a correlation matrix

Definition at line 177 of file cholesky_corr_constrain.hpp.