Automatic Differentiation
 
Loading...
Searching...
No Matches
read_corr_matrix.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_READ_CORR_MATRIX_HPP
2#define STAN_MATH_REV_FUN_READ_CORR_MATRIX_HPP
3
8
9namespace stan {
10namespace math {
11
26template <typename T_CPCs, require_var_vector_t<T_CPCs>* = nullptr>
28 size_t K) {
29 if (K == 0) {
30 return Eigen::MatrixXd();
31 }
32
34}
35
55template <typename T_CPCs, require_var_vector_t<T_CPCs>* = nullptr>
57 const T_CPCs& CPCs, size_t K, scalar_type_t<T_CPCs>& log_prob) {
58 if (K == 0) {
59 return Eigen::MatrixXd();
60 }
61
62 return multiply_lower_tri_self_transpose(read_corr_L(CPCs, K, log_prob));
63}
64
65} // namespace math
66} // namespace stan
67
68#endif
Eigen::Matrix< value_type_t< EigMat >, EigMat::RowsAtCompileTime, EigMat::RowsAtCompileTime > multiply_lower_tri_self_transpose(const EigMat &m)
Eigen::Matrix< value_type_t< T_CPCs >, Eigen::Dynamic, Eigen::Dynamic > read_corr_matrix(const T_CPCs &CPCs, size_t K)
Return the correlation matrix of the specified dimensionality corresponding to the specified canonica...
Eigen::Matrix< value_type_t< T >, Eigen::Dynamic, Eigen::Dynamic > read_corr_L(const T &CPCs, size_t K)
Return the Cholesky factor of the correlation matrix of the specified dimensionality corresponding to...
typename scalar_type< T >::type scalar_type_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...