1#ifndef STAN_MATH_REV_CONSTRAINT_CORR_MATRIX_CONSTRAIN_HPP
2#define STAN_MATH_REV_CONSTRAINT_CORR_MATRIX_CONSTRAIN_HPP
43template <
typename T, require_var_vector_t<T>* =
nullptr>
45 Eigen::Index k_choose_2 = (k * (k - 1)) / 2;
49 internal::cholesky_corr_factor<internal::CorrOrder::column>(
50 std::forward<T>(x), k));
73template <
typename T, require_var_vector_t<T>* =
nullptr>
76 Eigen::Index k_choose_2 = (k * (k - 1)) / 2;
82 internal::cholesky_corr_factor<internal::CorrOrder::column>(
83 std::forward<T>(x), k));
auto corr_matrix_log_jacobian_coefficients(Eigen::Index K)
Return a lazy expression of the coefficients c for which the log absolute Jacobian determinant of cor...
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > multiply_lower_tri_self_transpose(const EigMat &m)
fvar< T > log_cosh(const fvar< T > &x)
Return the natural logarithm of the hyperbolic cosine of the argument.
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > corr_matrix_constrain(T &&x, Eigen::Index k)
Return the correlation matrix of the specified dimensionality derived from the specified vector of un...
void check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Check if the provided sizes match.
auto dot_product(const T_a &a, const T_b &b)
Returns the dot product of the specified vectors.
typename scalar_type< T >::type scalar_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...