Loading [MathJax]/extensions/TeX/AMSsymbols.js
Automatic Differentiation
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
read_corr_matrix.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_READ_CORR_MATRIX_HPP
2#define STAN_MATH_PRIM_FUN_READ_CORR_MATRIX_HPP
3
7
8namespace stan {
9namespace math {
10
25template <typename T_CPCs, require_eigen_vector_t<T_CPCs>* = nullptr>
26Eigen::Matrix<value_type_t<T_CPCs>, Eigen::Dynamic, Eigen::Dynamic>
27read_corr_matrix(const T_CPCs& CPCs, size_t K) {
28 if (K == 0) {
29 return {};
30 }
31
33}
34
56template <typename T_CPCs, typename Lp,
59Eigen::Matrix<value_type_t<T_CPCs>, Eigen::Dynamic, Eigen::Dynamic>
60read_corr_matrix(const T_CPCs& CPCs, size_t K, Lp& log_prob) {
61 if (K == 0) {
62 return {};
63 }
64
65 return multiply_lower_tri_self_transpose(read_corr_L(CPCs, K, log_prob));
66}
67
68} // namespace math
69} // namespace stan
70
71#endif
require_t< std::is_convertible< std::decay_t< T >, std::decay_t< S > > > require_convertible_t
Require types T and S satisfies std::is_convertible.
require_t< is_eigen_vector< std::decay_t< T > > > require_eigen_vector_t
Require type satisfies is_eigen_vector.
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...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...