1 #ifndef STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_1D_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_TO_ARRAY_1D_HPP 14 template <
typename T,
int R,
int C>
16 const Eigen::Matrix<T, R, C> & matrix
18 const T* datap = matrix.data();
19 int size = matrix.size();
20 std::vector<T> result(size);
21 for (
int i=0; i <
size; i++)
35 inline std::vector<typename scalar_type<T>::type>
37 size_t size1 = x.size();
41 std::vector<T> y(size1*size2);
42 for (
size_t i = 0, ij = 0; i < size1; i++)
43 for (
size_t j = 0; j < size2; j++, ij++)
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
std::vector< T > to_array_1d(const Eigen::Matrix< T, R, C > &matrix)