1#ifndef STAN_MATH_PRIM_FUN_TO_VECTOR_ARRAY_HPP
2#define STAN_MATH_PRIM_FUN_TO_VECTOR_ARRAY_HPP
19template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr>
20inline std::vector<Eigen::Matrix<value_type_t<EigMat>, Eigen::Dynamic, 1>>
23 std::vector<Eigen::Matrix<T, Eigen::Dynamic, 1>> result;
24 result.reserve(matrix.cols());
25 for (
int j = 0; j < matrix.cols(); ++j) {
26 result.push_back(matrix.col(j));
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
std::vector< Eigen::Matrix< value_type_t< EigMat >, Eigen::Dynamic, 1 > > to_vector_array(const EigMat &matrix)
Returns a standard vector of Eigen column vectors from the columns of the input matrix.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...