1#ifndef STAN_MATH_REV_FUN_TO_VECTOR_HPP
2#define STAN_MATH_REV_FUN_TO_VECTOR_HPP
19template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr>
21 using view_type = Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, 1>>;
23 view_type(x.vi_->val_.data(), x.rows() * x.cols()),
24 view_type(x.vi_->adj_.data(), x.rows() * x.cols())));
A vari_view is used to read from a slice of a vari_value with an inner eigen type.
auto to_vector(T_x &&x)
Returns input matrix reshaped into a vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...