1#ifndef STAN_MATH_PRIM_FUN_READ_COV_L_HPP
2#define STAN_MATH_PRIM_FUN_READ_COV_L_HPP
27template <
typename T_CPCs,
typename T_sds,
28 require_all_eigen_vector_t<T_CPCs, T_sds>* =
nullptr,
29 require_vt_same<T_CPCs, T_sds>* =
nullptr>
30Eigen::Matrix<value_type_t<T_CPCs>, Eigen::Dynamic, Eigen::Dynamic>
read_cov_L(
32 size_t K = sds.rows();
36 [](
const auto& b,
const auto& sds) {
37 return sds.matrix().asDiagonal() * b;
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
auto make_holder(const F &func, Args &&... args)
Constructs an expression from given arguments using given functor.
fvar< T > log(const fvar< T > &x)
static constexpr double LOG_TWO
The natural logarithm of 2, .
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
Eigen::Matrix< value_type_t< T_CPCs >, Eigen::Dynamic, Eigen::Dynamic > read_cov_L(const T_CPCs &CPCs, const T_sds &sds, value_type_t< T_CPCs > &log_prob)
This is the function that should be called prior to evaluating the density of any elliptical distribu...
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
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 ...