Automatic Differentiation
 
Loading...
Searching...
No Matches
cov_matrix_constrain_lkj.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename T , require_eigen_col_vector_t< T > * = nullptr>
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > stan::math::cov_matrix_constrain_lkj (T &&x, size_t k)
 Return the k x k covariance matrix (diag(sds) L) (diag(sds) L)^T, with L the Cholesky factor of the correlation matrix of the first k choose 2 unconstrained values and sds = exp(x.tail(k)).
 
template<typename T , require_eigen_col_vector_t< T > * = nullptr>
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > stan::math::cov_matrix_constrain_lkj (T &&x, size_t k, return_type_t< T > &lp)
 Return the covariance matrix as cov_matrix_constrain_lkj(x, k) and add the log absolute Jacobian determinant to lp.
 
template<bool Jacobian, typename T , require_not_std_vector_t< T > * = nullptr>
auto stan::math::cov_matrix_constrain_lkj (T &&x, size_t k, return_type_t< T > &lp)
 Return the covariance matrix of the specified dimensionality derived from constraining the specified vector of unconstrained values.