1 #ifndef STAN_MATH_PRIM_MAT_FUN_RESIZE_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_RESIZE_HPP 10 template <
typename T,
int R,
int C>
11 void resize(Eigen::Matrix<T, R, C>& x,
const std::vector<int>&
dims,
int pos) {
12 x.resize(dims[pos], dims[pos + 1]);
16 void resize(T ,
const std::vector<int>& ,
int ) {
21 void resize(std::vector<T>& x,
const std::vector<int>&
dims,
int pos) {
24 if (pos >= static_cast<int>(dims.size()))
26 for (
size_t i = 0; i < x.size(); ++i)
void dims(const T &x, std::vector< int > &result)
void resize(Eigen::Matrix< T, R, C > &x, const std::vector< int > &dims, int pos)