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

◆ cholesky_corr_log_jacobian_coefficients()

auto stan::math::internal::cholesky_corr_log_jacobian_coefficients ( Eigen::Index  K)
inline

Return a lazy expression of the coefficients c for which the log absolute Jacobian determinant of cholesky_corr_constrain is -sum_n c_n log(cosh(y_n)), in row order: the coefficient of element (row, col) is row + 1 - col, with row recovered from the position by inverting cholesky_corr_position<CorrOrder::row>.

The inverse is exact, since at the first position of a row the radicand 1 + 8 pos is the perfect square (2 row - 1)^2, for which sqrt is exact, so floor never lands one row too low.

Parameters
Knumber of rows
Returns
coefficients in the order of the unconstrained vector

Definition at line 60 of file cholesky_corr_constrain.hpp.