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

◆ cholesky_corr_factor() [2/2]

template<CorrOrder Order, typename T , require_var_vector_t< T > * = nullptr>
var_value< Eigen::MatrixXd > stan::math::internal::cholesky_corr_factor ( T &&  y,
Eigen::Index  K 
)
inline

Return the Cholesky factor of a correlation matrix from unconstrained values y, whose partial correlations are tanh(y), as the prim version does.

The reverse pass propagates each adjoint to its own y and, through the shared exp(-a), to every earlier y of the row.

Template Parameters
Orderorder of the partial correlations in y
Ttype of the var_value vector
Parameters
yunconstrained values, K (K - 1) / 2 of them
Knumber of rows
Returns
Cholesky factor of a correlation matrix

Definition at line 33 of file cholesky_corr_constrain.hpp.