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

◆ cov_matrix_constrain_lkj() [3/5]

template<bool Jacobian, typename T , require_not_std_vector_t< T > * = nullptr>
auto stan::math::cov_matrix_constrain_lkj ( const T &  x,
size_t  k,
return_type_t< T > &  lp 
)
inline

Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values.

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 rows or columns equal to 1
Parameters
xInput vector of unconstrained partial correlations and standard deviations
kDimensionality of returned covariance matrix
[in,out]lplog density accumulator
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.

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 rows or columns equal to 1
Parameters
xInput vector of unconstrained partial correlations and standard deviations
kDimensionality of returned covariance matrix
[in,out]lplog density accumulator
Returns
Covariance matrix derived from the unconstrained partial correlations and deviations.

Definition at line 87 of file cov_matrix_constrain_lkj.hpp.