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

◆ cholesky_corr_constrain() [3/5]

template<bool Jacobian, typename T , require_not_std_vector_t< T > * = nullptr>
auto stan::math::cholesky_corr_constrain ( const T &  y,
int  K,
return_type_t< T > &  lp 
)
inline

Return The cholesky of a KxK correlation matrix.

If the Jacobian parameter is true, the log density accumulator is incremented with the log absolute Jacobian determinant of the transform. All of the transforms are specified with their Jacobians in the Stan Reference Manual chapter Constraint Transforms.

Template Parameters
Jacobianif true, increment log density accumulator with log absolute Jacobian determinant of constraining transform
TA type inheriting from Eigen::DenseBase or a var_value with inner type inheriting from Eigen::DenseBase with compile time dynamic rows and 1 column
Parameters
yLinearly Serialized vector of size (K * (K - 1))/2 holding the column major order elements of the lower triangurlar
KThe size of the matrix to return
[in,out]lplog density accumulator

If the Jacobian parameter is true, the log density accumulator is incremented with the log absolute Jacobian determinant of the transform. All of the transforms are specified with their Jacobians in the Stan Reference Manual chapter Constraint Transforms.

Template Parameters
Jacobianif true, increment log density accumulator with log absolute Jacobian determinant of constraining transform
TA standard vector with inner type inheriting from Eigen::DenseBase or a var_value with inner type inheriting from Eigen::DenseBase with compile time dynamic rows and 1 column
Parameters
yLinearly Serialized vector of size (K * (K - 1))/2 holding the column major order elements of the lower triangurlar
KThe size of the matrix to return
[in,out]lplog density accumulator

Definition at line 94 of file cholesky_corr_constrain.hpp.